A Cone3d consists of a conical outer surface, a circular base and a tip;
it is defined by its center point on the base, axial direction, radius and overall
length. This module contains functionality for:
Construct a cone that lies along the given axis, with the center of the base and tip points given as (signed) distances along that axis:
exampleCone =
Cone3d.along Axis3d.x
{ base = Length.meters -1
, tip = Length.meters 3
, radius = Length.meters 1
}
Cone3d.basePoint exampleCone
--> Point3d.meters -1 0 0
Cone3d.tipPoint exampleCone
--> Point3d.meters 3 0 0
Cone3d.length exampleCone
--> Length.meters 4Note that tip may be less than base, but then the axial direction of the
returned cone will be the opposite of the axial direction of the given axis.
Construct a cone given the center point on the base, axial direction towards the tip, radius and length. Negative values for radius or length will be treated as positive (the absolute values will be used).
Attempt to construct a cone from the given center point on the base,
tip point and radius. If the base and tip points are coincident (the same point),
returns Nothing.
Get the central axis of a cone. The origin point of the axis will be at the center point of the base, and the direction of the axis will be from the cone's base point towards its tip.
Get the axial direction of a cone.
Get the base radius of a cone.
Get the base diameter of a cone (twice its radius).
Get the overall length of a cone.
Get the base point of a cone. This is the center point of the circle that forms the base of the cone.
Get the tip point of a cone.
Get the circle at the base of a cone. The axial direction of this circle will be the reverse of the axial direction of the cone itself (the circle axial direction will point backwards/outwards).
Get the plane at the base of a cone. The normal direction of this plane will be the same as the axial direction of the cone itself.
Get the volume of a cone.
Get the minimal bounding box containing a given cone.
Check if a cone contains a given point.
Transformations generally behave just like the ones in the
Point3d module.
Scale a cone about a given point by a given scale.
Rotate a cone around a given axis by a given angle.
Translate a cone by a given displacement.
Translate a cone in a given direction by a given distance.
Mirror a cone across a given plane.
Convert a cone 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 a cone 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 a cone considered to be defined in local coordinates relative to a given reference frame, and return that cone expressed in global coordinates.
Take a cone defined in global coordinates, and return it expressed in local coordinates relative to a given reference frame.