Index Topic Contents | |||
Previous Topic: DAStatic Functions Relevant to DAPath2 Objects Next Topic: DAStatic Properties Relevant to DAPoint2 Objects |
DAStatic Functions Relevant to DAPoint2 Objects
DAStatics Class
AddPoint2VectorCreates a DAPoint2 object. The location of the object is calculated by adding the corresponding coordinates of the given DAPoint2 and DAVector2 objects.
lib.AddPoint2Vector(
pt,
vec
)Parameters
- pt
- A DAPoint2 object.
- vec
- A DAVector2 object.
Return Values
Returns the DAPoint2 object.
See Also
DAStatics Class
DerivativePoint2Creates a DAVector2 object representing the instantaneous derivative (rate of change) of pt. For example, a constant yields a constant derivative of [0 0], and Point2(time, 0) (without additional time substitutions) yields a constant derivative of [1 0].
lib.DerivativePoint2(
pt
)Parameters
- pt
- A DAPoint2 object whose derivative is found.
Return Values
Returns the DAVector2 object.
DAStatics Class
DistancePoint2Creates a DAPoint2 object representing the distance between the two given points, p1 and p2.
lib.DistancePoint2(
p1,
p2
)Parameters
- p1 and p2
- The DAPoint2 objects.
Return Values
Returns the DANumber object.
See Also
DAStatics Class
DistanceSquaredPoint2Creates a DANumber object representing the square of the distance between the two points, p1 and p2. This is the same as the DistancePoint2 function except that the distance is squared.
lib.DistanceSquaredPoint2(
p1,
p2
)Parameters
- p1 and p2
- The DAPoint2 objects.
Return Values
Returns the DANumber object.
See Also
DAStatics Class
Point2AnimCreates a DAPoint2 object. The location of the object is given in Cartesian coordinates.
lib.Point2Anim(
x,
y
)Parameters
- x and y
- The DANumber objects, specifying the coordinate values. The x specifies the distance along the x-axis from the origin to the point, and y specifies the distance along the y-axis. These parameters must be animated numbers.
Return Values
Returns the DAPoint2 object.
See Also
DAStatics Class
Point2Same as Point2Anim except that x and y are non-animated numbers (doubles).
lib.Point2(
x,
y
)DAStatics Class
Point2BSplineCreates a DAPoint2 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).
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 DAPoint2 object 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.
lib.Point2BSpline(
degree,
knots,
control_elements,
weights,
evaluation
)Parameters
- degree
- A number (long) representing the mathematical degree of the B-spline to evaluate. Must be 1, 2, or 3.
- knots
- An array (variant) of DANumber objects representing the knots used to calculate the B-spline.
- control_elements
- An array (variant) of DAPoint2 objects representing the control elements used to calculate the B-spline.
- weights
- An 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 non-rational B-splines, the value of weights is null. This must be an animated number.
- evaluation
- A DANumber object that controls the spline evaluation.
Return Values
Returns the DAPoint2 object.
DAStatics Class
Point2PolarAnimCreates a DAPoint2 object. The location of the object is given in polar coordinates.
lib.Point2PolarAnim(
XYangle,
length
)Parameters
- XYangle
- The DANumber object specifying the angle, in radians, between the positive x-axis and the ray that goes from the origin to the point. This must be an animated number.
- length
- The DANumber object specifying the distance from the origin to the point. This must be an animated number.
Return Values
Returns the DAPoint2 object.
See Also
DAStatics Class
Point2PolarSame as Point2PolarAnim except that x and y are non-animated numbers (doubles).
lib.Point2Polar(
x,
y
)DAStatics Class
SubPoint2Creates a DAVector2 object. The coordinate values of the vector are calculated by subtracting the coordinates of p2 from the corresponding coordinates of p1.
lib.SubPoint2(
p1,
p2
)Parameters
- p1 and p2
- The DAPoint2 objects to be subtracted.
Return Values
Returns the DAVector2 object.
DAStatics Class
SubPoint2VectorCreates a DAPoint2 object. The location of the point is calculated by subtracting the coordinates of the given vector behavior from the corresponding coordinates of the given point.
lib.SubPoint2Vector(
pt,
vec
)Parameters
- pt
- A DAPoint2 object.
- vec
- A DAVector2 object.
Return Values
Returns the DAPoint2 object.
See Also
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.