curveVector()

Synopsis

Returns a unit vector at the given point for the characteristic specified. If the curvature at the location is low, the Normal and BiNormal are relatively useless. At inflection points, the vectors flip sides. The three vectors are mutually orthogonal, and form an "osculating frame". Generally, these vectors are more commonly used than derivative vectors, which are affected by the underlying parameterization of the mathematical model of the curve.

Syntax

curveVector ( Curve As Part, _
              p1 As Point, _
              TNB As Name ) As Vector 
Argument Type Description
Curve part The curve whose vector is desired. Must be a kind of curveMixin.
p1 point The point at which the vector is computed. Must be a point on the curve.
TNB name The name of the characteristic vector. Can be either :Tangent, :Normal, or :BiNormal.

Example 1

Intent >curveVector(Arc_1, Arc_1.midPoint, :Tangent) 
--> Vector_(0.0, -1.0, 0.0, WorldFrame()) 

The result is always a unit vector. The only difference between this vector and the one obtained by curveDerivative with an index of 1 is magnitude.

Example 2

Intent >curveVector(Arc_1, Arc_1.midPoint, :BiNormal) 
--> Vector_(0.0, 0.0, 1.0, WorldFrame()) 

The BiNormal is the cross product of the Tangent and Normal vectors. Note that this points "out of the page".

At points of zero curvature - such as any point on a line, inflection points of splines, or ends of certain fitted splines - the normal and biNormal vectors are undefined or ambiguous. In these cases, it is common to get zero or near-zero vectors returned. Such vectors are likely cause degenerate geometry or other errors when used in other calculations. It may be necessary to anticipate and handle such cases appropriately for the particular intended use.