Javascript, PHP and SVG based mathetical inversion transformation