DAStatics Functions Relevant to DAPoint2 Objects

AddPoint2Vector Creates a DAPoint2 object. The location of the object is calculated by adding the corresponding coordinates of the given DAPoint2 and DAVector2 objects.
DerivativePoint2 Creates a DAVector2 object representing the instantaneous derivative (rate of change) of pt.
DistancePoint2 Creates a DANumber object representing the distance between the two given points, p1 and p2.
DistanceSquaredPoint2 Creates a DANumber object representing the square of the distance between the two points, p1 and p2.
Point2 Creates a DAPoint2 object. The location of the object is given in Cartesian coordinates. Same as Point2Anim except that x and y are nonanimated numbers (doubles).
Point2Anim Creates a DAPoint2 object. The location of the object is given in Cartesian coordinates.
Point2BSpline Creates a DAPoint2 object based on a B-spline function.
Point2Polar Creates a DAPoint2 object. The location of the object is given in polar coordinates. Same as Point2PolarAnim except that the parameters are nonanimated numbers (doubles).
Point2PolarAnim Creates a DAPoint2 object. The location of the object is given in polar coordinates.
SubPoint2 Creates a DAVector2 object. The coordinate values of the vector are calculated by subtracting the coordinates of p2 from the corresponding coordinates of p1.
SubPoint2Vector Creates 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.

AddPoint2Vector

DAStatics Class

Creates a DAPoint2 object. The location of the object is calculated by adding the corresponding coordinates of the given DAPoint2 and DAVector2 objects.

Syntax

lib.AddPoint2Vector( pt, vec )

Parameters

pt
DAPoint2 object.
vec
DAVector2 object.

Return Value

Returns the DAPoint2 object.

See Also

SubPoint2Vector

DerivativePoint2

DAStatics Class

Creates 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].

Syntax

lib.DerivativePoint2( pt )

Parameters

pt
DAPoint2 object whose derivative is found.

Return Value

Returns the DAVector2 object.

DistancePoint2

DAStatics Class

Creates a DANumber object representing the distance between the two given points, p1 and p2.

Syntax

lib.DistancePoint2( p1, p2 )

Parameters

p1 and p2
DAPoint2 objects.

Return Value

Returns the DANumber object.

See Also

DistanceSquaredPoint2

DistanceSquaredPoint2

DAStatics Class

Creates 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.

Syntax

lib.DistanceSquaredPoint2( p1, p2 )

Parameters

p1 and p2
DAPoint2 objects.

Return Value

Returns the DANumber object.

See Also

DistancePoint2

Point2

DAStatics Class

Creates a DAPoint2 object. The location of the object is given in Cartesian coordinates. Same as Point2Anim except that x and y are nonanimated numbers (doubles).

Syntax

lib.Point2( x, y )

Parameters

x and y
Values specifying the coordinates. 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 are nonanimated numbers (double values).

Return Value

Returns the DAPoint2 object.

Point2Anim

DAStatics Class

Creates a DAPoint2 object. The location of the object is given in Cartesian coordinates.

Syntax

lib.Point2Anim( x, y )

Parameters

x and y
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 Value

Returns the DAPoint2 object.

See Also

Point2PolarAnim

Point2BSpline

DAStatics Class

Creates 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).

Syntax

lib.Point2BSpline( degree, knots, control_elements, weights, evaluation )

Parameters

degree
Number (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 DAPoint2 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. This must be an animated number.
evaluation
DANumber object that controls the spline evaluation.

Return Value

Returns the DAPoint2 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 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.

Point2Polar

DAStatics Class

Creates a DAPoint2 object. The location of the object is given in polar coordinates. Same as Point2PolarAnim except that the parameters are nonanimated numbers (doubles).

Syntax

lib.Point2Polar( XYangle, length )

Parameters

XYangle
A double value specifying the angle, in radians, between the positive x-axis and the ray that goes from the origin to the point. This is a nonanimated number.
length
A double value specifying the distance from the origin to the point. This is a nonanimated number.

Return Value

Returns the DAPoint2 object.

Point2PolarAnim

DAStatics Class

Creates a DAPoint2 object. The location of the object is given in polar coordinates.

Syntax

lib.Point2PolarAnim( XYangle, length )

Parameters

XYangle
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
DANumber object specifying the distance from the origin to the point. This must be an animated number.

Return Value

Returns the DAPoint2 object.

See Also

Point2Anim

SubPoint2

DAStatics Class

Creates a DAVector2 object. The coordinate values of the vector are calculated by subtracting the coordinates of p2 from the corresponding coordinates of p1.

Syntax

lib.SubPoint2( p1, p2 )

Parameters

p1 and p2
DAPoint2 objects to be subtracted.

Return Value

Returns the DAVector2 object.

SubPoint2Vector

DAStatics Class

Creates 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.

Syntax

lib.SubPoint2Vector( pt, vec )

Parameters

pt
DAPoint2 object.
vec
DAVector2 object.

Return Value

Returns the DAPoint2 object.

See Also

AddPoint2Vector


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.