Like 3-D points, 3-D vectors are also represented as zero-based, one-dimensional array that contain three numbers. These three number represent to the X, Y and Z coordinate values of the vector. Note, unlike points, vectors define magnitude (length) and direction, not position. A 3-D vector can be constructed in a number of different ways. For example,

Dim arrVector1, arrVector(2)

arrPoint1 = Array(1.0, 0.0, 0.0) ' Unit world x-axis vector

' Unit world y-axis vector

arrPoint2(0) = 0.0

arrPoint2(1) = 1.0

arrPoint2(2) = 0.0

Vectors can also be created from two 3-D points using the VectorCreate method.

RhinoScript contains a number of methods to manipulate vectors. See Points and Vectors for details.