Ticket #6
(new enhancement)

Remove origin and standard axis biases in Transformations

Description

rotate3 rotates about the origin and scale3 fixes the origin and scales along the x y and z axis. An affine transform should be origin independent, and operations ought to be basis independent.

rotate3 should take an fixed point parameter (a point on the rotation axis). scale3 should take an fixed point parameter (the point to be fixed by the scale) and a vector that gives the direction to scale and whose length specifies the scaling factor. uscale3 should take a fixed point and a magnitude. translate3 is fine.

These changes prevent common errors such as scaling or rotating sending the object outside the field of view. This happens because users intuitively expect the operations to scale and rotate about some unstated centre of mass. By requiring these parameters, users will think about where the want to scale and rotate about and pass in the required information.

The same changes should be applied to Transform2. However a reflect function should perhaps be added because otherwise all Transform2 functions would have positive determinant.

Change History

Sorry, I made a mistake in specifying what an anisotropic scale needs. The user needs to specify a plane and a scaling magnitude. This can be given by a fixed point (some point on the fixed plane) a (unit) normal for the plane, and a scaling magnitude. Because the magnitude is given separately, reflections can be created by specifying (-1) as the magnitude.