Geometric
Public / Methods
AreaPolygon
2 overloads
Computes the signed area of the given simple polygon.
The polygon is defined as follows:
v[a ] := first polygon vertex v[a + n] := n-th polygon vertex v[b ] := last polygon vertex (not equal to first) where b - a >= 2 b - a >= n >= 0
Inverting the order of the polygon vertices will flip the sign of the area value. For a standard Cartesian coordinate system (X-axis points to the right, Y-axis points upwards), clockwise polygons have negative area values and counter-clockwise polygons have positive area values.
Computes the signed area of the given simple polygon.
The polygon is defined as follows:
v[i[a ]] := first polygon vertex v[i[a + n]] := n-th polygon vertex v[i[b ]] := last polygon vertex (not equal to first) where b - a >= 2 b - a >= n >= 0
Inverting the order of the polygon vertices will flip the sign of the area value. For a standard Cartesian coordinate system (X-axis points to the right, Y-axis points upwards), clockwise polygons have negative area values and counter-clockwise polygons have positive area values.
AreaTriangle
4 overloads
Computes the area of the given triangle.
Computes the area of the given triangle.
Computes the area of the given triangle.
Computes the area of the given triangle.
BestBasisVector
Returns the basis vector (X, Y or Z) that has the highest amount of perpendicularity to the given vector.
CartesianToSpherical
2 overloads
Converts the given cartesian coordinates into spherical coordinates.
The components of the returned vector have the following semantic:
spherical.X := radius (distance to origin). spherical.Y := azimuthal angle (angle from positive X-axis in radians) in the range [-PI..PI]. spherical.Z := polar angle (angle from positive Z-axis in radians) in the range [0..PI].
Converts the given cartesian coordinates into spherical coordinates.
The components of the returned vector have the following semantic:
spherical.X := radius (distance to origin). spherical.Y := azimuthal angle (angle from positive X-axis in radians) in the range [-PI..PI]. spherical.Z := polar angle (angle from positive Z-axis in radians) in the range [0..PI].
CheckIntersectionOfLineSegments
2 overloads
Checks if the given line segments intersect.
Checks if the given line segments intersect.
ConeFitAngle
Computes the opening angle of the right circular cone having the smallest volume that contains the given sphere.
The cone apex is at (0,0,0). The cone axis is collinear to (1,0,0). The sphere center is at (x in, y in, 0).
ConeFitDistance
Computes the translation that must be applied to the given right circular to make it contain the given sphere, while only touching it in a single point.
The cone apex is at (0,0,0). The cone axis is collinear to (1,0,0). The sphere center is at (x in, y in, 0).
DistancePointToHorizon
Computes the distance from the given point to the horizon circle on a sphere centered at the coordinate origin and having the given radius.
DistancePointToLineSegment
8 overloads
Computes the distance between the point (0|0)
and the given line segment.
Computes the distance between the point (0|0)
and the given line segment.
Computes the distance between the point (0|0)
and the given line segment.
Computes the distance between the point (0|0)
and the given line segment.
Computes the distance between the point (0|0)
and the given line segment.
Computes the distance between the point (0|0)
and the given line segment.
Computes the distance between the point (0|0)
and the given line segment.
Computes the distance between the point (0|0)
and the given line segment.
IntersectionOfCircles
Computes the intersection of the given circles.
The first circle is centered at the coordinate origin, the second circle is centered at (d,0).
IntersectionOfLines
2 overloads
Computes the intersection of the given lines.
Computes the intersection of the given lines.
IntersectionOfLineSegments
2 overloads
Computes the intersection of the given line segments.
Computes the intersection of the given line segments.
Length
4 overloads
Computes the length of the given vector.
Computes the length of the given vector.
Computes the length of the given vector.
Computes the length of the given vector.
LengthSqr
4 overloads
Computes the square length of the given vector.
Computes the square length of the given vector.
Computes the square length of the given vector.
Computes the square length of the given vector.
Lerp
4 overloads
Linearly interpolates between the given vectors.
Linearly interpolates between the given vectors.
Linearly interpolates between the given vectors.
Linearly interpolates between the given vectors.
RLength
4 overloads
Computes the reciprocal length of the given vector.
Computes the reciprocal length of the given vector.
Computes the reciprocal length of the given vector.
Computes the reciprocal length of the given vector.
Slerp
3 overloads
Spherically interpolates between the given vectors.
Spherically interpolates between the given vectors.
- See also
Spherically interpolates between the given vectors.
- See also
SphericalToCartesian
2 overloads
Converts the given spherical coordinates into cartesian coordinates.
The components of the given vector have the following semantic:
spherical.X := radius (distance to origin). spherical.Y := azimuthal angle (angle from positive X-axis in radians) in the range [-PI..PI]. spherical.Z := polar angle (angle from positive Z-axis in radians) in the range [0..PI].
Converts the given spherical coordinates into cartesian coordinates.
The components of the given vector have the following semantic:
spherical.X := radius (distance to origin). spherical.Y := azimuthal angle (angle from positive X-axis in radians) in the range [-PI..PI]. spherical.Z := polar angle (angle from positive Z-axis in radians) in the range [0..PI].
Winding
2 overloads
Returns the winding at the joint of two connected line segments.
The winding is defined as the sign of the Z-component of the cross product between b-a
and c-b
. The Z-components of a
, b
and c
are assumed to be 0
. A winding of zero means that all three points lie on the same line (i.e. the input vectors of the cross product are collinear). For a standard Cartesian coordinate system (X-axis points to the right, Y-axis points upwards), clockwise is negative and counter-clockwise is positive.
Returns the winding at the joint of two connected line segments.
The winding is defined as the sign of the Z-component of the cross product between b-a
and c-b
. The Z-components of a
, b
and c
are assumed to be 0
. A winding of zero means that all three points lie on the same line (i.e. the input vectors of the cross product are collinear). For a standard Cartesian coordinate system (X-axis points to the right, Y-axis points upwards), clockwise is negative and counter-clockwise is positive.