An ellipsoid is defined by a
center point, X, Y and Z radii, and a Frame3d representing the ellipsoid's
axes. This module includes functionality for
Construct a 3d ellipsoid from its axes and X, Y and Z radii. If you pass a negative radius, the absolute value will be used.
exampleEllipsoid =
Ellipsoid3d.with
{ axes = Frame3d.atPoint (Point3d.meters 2 1 3)
, xRadius = Length.meters 5
, yRadius = Length.meters 3
, zRadius = Length.meters 4
}Get the geometric center of an ellipsoid.
Get the X, Y and Z axes of an ellipsoid as a Frame3d.
Get the X axis of an ellipsoid.
Get the Y axis of an ellipsoid.
Get the Z axis of an ellipsoid.
Get the direction of the ellipsoid's X axis.
Get the direction of the ellipsoid's Y axis.
Get the direction of the ellipsoid's Z axis.
Get the radius of an ellipsoid along its X axis.
Ellipsoid3d.xRadius exampleEllipsoid
--> Length.meters 5Get the radius of an ellipsoid along its Y axis.
Ellipsoid3d.yRadius exampleEllipsoid
--> Length.meters 3Get the radius of an ellipsoid along its Z axis.
Ellipsoid3d.zRadius exampleEllipsoid
--> Length.meters 4Get the volume of an ellipsoid.
Get the minimal bounding box containing a given ellipsoid.
Ellipsoid3d.boundingBox exampleSphere
--> BoundingBox3d.from
--> (Point3d.meters -3 -2 -1)
--> (Point3d.meters 7 4 7)Check if an ellipsoid contains a given point.
Project an ellipsoid onto an axis, returning the range of projected distances along that axis.
Scale an ellipsoid about a given point by a given scale.
Rotate an ellipsoid around a given axis by a given angle.
Translate an ellipsoid by a given displacement.
Translate an ellipsoid in a given direction by a given distance.
Mirror an ellipsoid across a given plane. Note that this will flip the handedness of the ellipsoid's axes.
Convert an ellipsoid from one units type to another, by providing a conversion factor given as a rate of change of destination units with respect to source units.
Convert an ellipsoid from one units type to another, by providing an 'inverse' conversion factor given as a rate of change of source units with respect to destination units.
Take an ellipsoid defined in global coordinates, and return it expressed in local coordinates relative to a given reference frame.
Take an ellipsoid considered to be defined in local coordinates relative to a given reference frame, and return that ellipsoid expressed in global coordinates.