Table of Contents

Method TransformBy

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

TransformBy(GeoEllipse3, GeoTransform3)

Applies a transformation to an ellipse in space. Every transformation that does not flatten the ellipse's plane gives an ellipse: a move, a turn, a mirror, a scaling even or uneven, and a shear.

public static GeoEllipse3 TransformBy(GeoEllipse3 ellipse, GeoTransform3 transform)

Parameters

ellipse GeoEllipse3

The ellipse.

transform GeoTransform3

The transformation.

Returns

GeoEllipse3

The transformed ellipse.

Remarks

The images of the two semi-axes span the new plane, and the radii and the major axis come from their singular values in it, as TransformBy(GeoEllipse2, GeoTransform2) finds them: a circle of radius 100 in the plan scaled by 3 along X is the ellipse 300 by 100 along X. The zero of the eccentric angle goes to the end of the new major axis nearer where the old one went; when the two new radii agree to 1E-12 the result is a circle, and its major axis is where the old one went.

The normal goes where Transform(GeoPlane3) sends a plane's, and so where a circle's goes: a mirror in the plan turns an ellipse lying in it over, its normal down. Under any mirror the eccentric angle then reaches the images of the old rim's points in the opposite order: the old point at 30° goes to the new point at -30°.

Exceptions

ArgumentNullException

Thrown when the transformation is null.

InvalidOperationException

Thrown when the transformation cannot be undone, as Transform(GeoPlane3) throws for a circle's plane: judged by TryGetInverse(out GeoTransform3), within the default tolerance. One that can be undone, however hard it squashes, gives a thin ellipse.