Node: Affine Transformations for Ellipses, Next: , Previous: Labeling Ellipses, Up: Ellipse Reference



Affine Transformations

Transform rotate (const real x, [const real y = 0, [const real z = 0]]) Virtual function
Transform rotate (const Point& p0, const Point& p1, [const real angle = 180]) Virtual function
Transform rotate (const Path& p, [const real angle = 180]) Virtual function
Transform scale (real x, [real y = 1, [real z = 1]]) Virtual function
Transform shear (real xy, [real xz = 0, [real yx = 0, [real yz = 0, [real zx = 0, [real zy = 0]]]]]) Virtual function
Transform shift (real x, [real y = 0, [real z = 0]]) Virtual function
Transform shift (const Point& p) Virtual function
void shift_times (real x, [real y = 1, [real z = 1]]) Virtual function
void shift_times (const Point& p) Virtual function
These create a Transform t locally, and call do_transform(t). See Ellipse Reference; Performing Transformations.

Rotating and shifting an Ellipse neither change the size of an Ellipse, nor cause it to become non-elliptical. However, scaling and shearing can have these effects. For this reason, in scale() and shear(), do_transform() is called with true as its check argument, while it is false in rotate(), shift(), and shift_times().

If scaling or shearing is performed on an Ellipse, and it is still elliptical after the transformation, focus0, focus1, axis_h, axis_v, linear_eccentricity, and numerical_eccentricity are all recalculated. If the Ellipse is non-elliptical after the transformation, axis_h, axis_v, linear_eccentricity, and numerical_eccentricity are all set to INVALID_REAL. center, focus0, and focus1 are not set to INVALID_POINT. Although they are no longer the center and foci of an elliptical Ellipse, they may still have some use for the user or programmer.