    Contents  Index  Topic Contents
    Previous Topic: Static Methods Relevant to Path2Bvr Objects
    Next Topic: Static Fields Relevant to Point2Bvr Objects

> ## Static Methods Relevant to Point2Bvr Objects

> ###

> add

> Statics Class

> Creates a two-dimensional point behavior. The location of the point is calculated by adding the corresponding coordinates of the given point and vector behaviors.

> public static Point2Bvr add(
> Point2Bvr pt,
> Vector2Bvr vec
> );

> ##### Parameters

> pt
>   A Point2Bvr object.
> vec
>   A Vector2Bvr object.

> ##### Return Values

> Returns the Point2Bvr object.

> ##### See Also

> sub

> ###

> bSpline

> Statics Class

> Creates a Point2Bvr behavior 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 Point2Bvr is the traversal of the spline function according to the evaluation parameter. The evaluation parameter is a NumberBvr 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.

> public static Point2Bvr bSpline(
> int degree,
> NumberBvr[] knots,
> Point2Bvr[] control_elements,
> NumberBvr[] weights,
> NumberBvr evaluation
> );

> ##### Parameters

> degree
>   A number representing the mathematical degree of the B-spline to evaluate. Must be 1, 2, or 3.
> knots
>   An array of NumberBvr objects representing the knots used to calculate the B-spline.
> control_elements
>   An array of Point2Bvr objects representing the control elements used to calculate the B-spline.
> weights
>   An array of NumberBvr 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.
> evaluation
>   A NumberBvr object that controls the spline evaluation.

> ##### Return Values

> Returns the Point2Bvr object.

> ###

> derivative

> Statics Class

> Creates a two-dimensional vector behavior of the instantaneous derivative (rate of change) of the given point behavior. 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].

> public static Vector2Bvr derivative(
> Point2Bvr pt
> );

> ##### Parameters

> pt
>   A Point2Bvr object.

> ##### Return Values

> Returns the Vector2Bvr object.

> ###

> distance

> Statics Class

> Creates a number behavior representing the distance between two point behaviors.

> public static NumberBvr distance(
> Point2Bvr p1,
> Point2Bvr p2
> );

> ##### Parameters

> p1 and p2
>   The Point2Bvr objects.

> ##### Return Values

> Returns the NumberBvr object.

> ##### See Also

> distanceSquared

> ###

> distanceSquared

> Statics Class

> Creates a number behavior representing the square of the distance between two point behaviors. This is the same as the distance method except that the distance is squared.

> public static NumberBvr distanceSquared(
> Point2Bvr p1,
> Point2Bvr p2
> );

> ##### Parameters

> p1 and p2
>   The Point2Bvr objects.

> ##### Return Values

> Returns the NumberBvr object.

> ##### See Also

> distance

> ###

> point2

> Statics Class

> Creates a two-dimensional point behavior. The location of the point is given in Cartesian coordinates.

> public static Point2Bvr point2(
> NumberBvr x,
> NumberBvr y
> );

> ##### Parameters

> x and y
>   The NumberBvr 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 can also be of type double.

> ##### Return Values

> Returns the Point2Bvr object.

> ##### See Also

> point2Polar

> ###

> point2Polar

> Statics Class

> Creates a two-dimensional point behavior. The location of the point is given in polar coordinates.

> public static Point2Bvr point2Polar(
> NumberBvr XYangle,
> NumberBvr length
> );

> ##### Parameters

> XYangle
>   The NumberBvr object specifying the angle, in radians, between the positive x-axis and the ray that goes from the origin to the point. This parameter can also be of type double.
> length
>   The NumberBvr object specifying the distance from the origin to the point. This parameter can also be of type double.

> ##### Return Values

> Returns the Point2Bvr object.

> ##### See Also

> point2

> ###

> sub

> Statics Class

> Creates a two-dimensional vector behavior. The coordinate values of the vector are calculated by subtracting the coordinates of p2 from the corresponding coordinates of p1.

> public static Vector2Bvr sub(
> Point2Bvr p1,
> Point2Bvr p2
> );

> ##### Parameters

> p1 and p2
>   The Point2Bvr objects.

> ##### Return Values

> Returns the Vector2Bvr object.

> ###

> sub

> Statics Class

> Creates a two-dimensional point behavior. The location of the point is calculated by subtracting the coordinates of the given vector behavior from the corresponding coordinates of the given point behavior.

> public static Point2Bvr sub(
> Point2Bvr pt,
> Vector2Bvr vec
> );

> ##### Parameters

> pt
>   A Point2Bvr object.
> vec
>   A Vector2Bvr object.

> ##### Return Values

> Returns the Point2Bvr object.

> ##### See Also

> add

> © 1998 Microsoft Corporation. All rights reserved. Terms of Use.

> Top of Page