AddVector2 Creates a DAVector2 object that is the vector-valued sum of the two vectors. DerivativeVector2 Creates a DAVector2 object that is the instantaneous derivative (rate of change) of the given vector. DotVector2 Creates a DANumber object that represents the "dot product" of the given vectors. IntegralVector2 Creates a DAVector2 object that represents the sum of all the values of vec from the given start time to the present. NegVector2 Creates a DAVector2 object that is the same length as the original vector but points in the opposite direction. SubVector2 Creates a DAVector2 object. The direction and length of the vector are calculated by subtracting the coordinates of v2 from the corresponding coordinates of v1. Vector2 Creates a DAVector2 object having a direction and length as specified by the given Cartesian coordinates. Same as Vector2Anim except that x and y are nonanimated numbers (doubles). Vector2Anim Creates a DAVector2 object having a direction and length as specified by the given Cartesian coordinates. Vector2BSpline Creates a DAVector2 object based on a B-spline function. Vector2Polar Creates a DAVector2 object having a direction and length as specified by the given polar coordinates. Same as Vector2PolarAnim except that XYangle and length are nonanimated numbers (doubles). Vector2PolarAnim Creates a DAVector2 object having a direction and length as specified by the given polar coordinates. Vector2PolarDegrees Creates a DAVector2 object having a direction and length as specified by the given polar coordinates.
Creates a DAVector2 object that is the vector-valued sum of the two vectors.
Syntax
lib.AddVector2( v1, v2 )
Parameters
- v1 and v2
- DAVector2 objects to be added.
Return Value
Returns the DAVector2 object.
See Also
Creates a DAVector2 object that is the instantaneous derivative (rate of change) of the given vector. For example, a constant vector yields a constant derivative of [0 0], and Vector2 (time, 0) (without any additional time substitutions) yields a constant derivative vector of [1 0].
Syntax
lib.DerivativeVector2( vec )
Parameters
- vec
- DAVector2 object.
Return Value
Returns the DAVector2 object.
Creates a DANumber object that represent the "dot product" of the given vectors. The dot product is the product of the lengths of the vectors and the cosine of the angle between them.
Syntax
lib.DotVector2( v1, v2 )
Parameters
- v1 and v2
- DAVector2 objects.
Return Value
Returns the DANumber object.
Creates a DAVector2 object that represents the sum of all the values of vec from the given start time to the present.
Syntax
lib.IntegralVector2( vec )
Parameters
- vec
- DAVector2 object.
Return Value
Returns the DAVector2 object.
Creates a DAVector2 object that is the same length as the original vector but points in the opposite direction.
Syntax
lib.NegVector2( v1 )
Parameters
- v1
- DAVector2 object that is the original vector.
Return Value
Returns the DAVector2 object.
Creates a DAVector2 object. The direction and length of the vector are calculated by subtracting the coordinates of v2 from the corresponding coordinates of v1.
Syntax
lib.SubVector2( v1, v2 )
Parameters
- v1 and v2
- DAVector2 objects.
Return Value
Returns the DAVector2 object.
See Also
Creates a DAVector2 object having a direction and length as specified by the given Cartesian coordinates. Same as Vector2Anim except that x and y are nonanimated numbers (doubles).
Syntax
lib.Vector2( x, y )
Parameters
- x
- A double value specifying the distance along the x-axis from the origin to a point. This is a nonanimated number.
- y
- A double value specifying the distance along the y-axis. This is a nonanimated number.
Return Value
Returns the DAVector2 object.
Creates a DAVector2 object having a direction and length as specified by the given Cartesian coordinates.
Syntax
lib.Vector2Anim( x, y )
Parameters
- x
- DANumber object specifying the distance along the x-axis from the origin to a point. This must be an animated number.
- y
- DANumber object specifying the distance along the y-axis. This must be an animated number.
Return Value
Returns the DAVector2 object.
See Also
Creates a DAVector2 object based on a B-spline function. The function depends on the control elements, the knot vector, the mathematical degree, and the weights of the control elements (these are optional).
Syntax
lib.Vector2BSpline( degree, knots, control_elements, weights, evaluation )
Parameters
- degree
- Number (a long) representing the mathematical degree of the B-spline to evaluate. Must be 1, 2, or 3.
- knots
- Array (variant) of DANumber objects representing the knots used to calculate the B-spline.
- control_elements
- Array (variant) of DAVector2 objects representing the control elements used to calculate the B-spline.
- weights
- Array (variant) of DANumber objects representing the weights used to calculate the rational B-spline. There must be the same number of weights as control elements. For nonrational B-splines, the value of weights is null.
- evaluation
- DANumber object that controls the spline evaluation. This must be an animated number.
Return Value
Returns the DAVector2 object.
Remarks
A B-spline function without weights is piecewise polynomial and with weights is piecewise rational (the quotient of two polynomials). It requires that:
numberOfControlElements = numberOfKnots - degree + 1
The control elements define the approximate direction and shape of the function. The knots represent junction values, in parameter space, between the connected polynomial parts.
Given a degree d and a number of knots k, the function is valid in the range knotd to knotk-d+1, and is otherwise undefined. For example, for a degree 2 curve, the valid range is from the second knot to the next to the last knot, inclusive.
The returned DAVector2 is the traversal of the spline function according to the evaluation parameter. The evaluation parameter is a DANumber that must be in the valid range of the spline, which is [knotd, knotk-d+1]. Any values outside this range are automatically clamped to the end values.
Creates a DAVector2 object having a direction and length as specified by the given polar coordinates. Same as Vector2PolarAnim except that XYangle and length are nonanimated numbers (doubles).
Syntax
lib.Vector2Polar( XYangle, length )
Parameters
- XYangle
- A double value that is the counterclockwise angle of the vector, in radians, from the positive x-ray. This is a nonanimated number.
- length
- A double value that is the length of the vector. This is a nonanimated number.
Return Value
Returns the DAVector2 object.
Creates a DAVector2 object having a direction and length as specified by the given polar coordinates.
Syntax
lib.Vector2PolarAnim( XYangle, length )
Parameters
- XYangle
- DANumber object that is the counter-clockwise angle of the vector, in radians, from the positive x-ray. This must be an animated number.
- length
- DANumber object that is the length of the vector. This must be an animated number.
Return Value
Returns the DAVector2 object.
See Also
Creates a DAVector2 object having a direction and length as specified by the given polar coordinates.
Syntax
lib.Vector2PolarDegrees( XYangle, length )
Parameters
- XYangle
- Number (a double) that is the counter-clockwise angle of the vector (expressed in degrees) from the positive x-ray.
- length
- Number (a double) that is the length of the vector.
Return Value
Returns the DAVector2 object.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.