Statics Methods Relevant to Point3Bvr Objects

add Creates a three-dimensional point behavior. The location of the point is calculated by adding the corresponding coordinates of the given point and vector behaviors.
bSpline Creates a Point3Bvr behavior based on a B-spline function.
derivative Creates a three-dimensional vector behavior of the instantaneous derivative (rate of change) of the given point behavior.
distance Creates a number behavior representing the distance between two point behaviors.
distanceSquared Creates a number behavior representing the square of the distance between two point behaviors.
point3 Creates a three-dimensional point behavior. The location of the point is given in Cartesian coordinates.
point3Spherical Creates a three-dimensional point behavior. The location of the point is given in spherical coordinates.
sub(p1, p2) Creates a three-dimensional vector behavior.
sub(pt, vec) Creates a three-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.

add

Statics Class

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

Syntax

public static Point3Bvr add( Point3Bvr pt, Vector3Bvr vec );

Parameters

pt
Point3Bvr object.
vec
Vector3Bvr object.

Return Value

Returns the Point3Bvr object.

See Also

sub

bSpline

Statics Class

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

Syntax

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

Parameters

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

Return Value

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

derivative

Statics Class

Creates a three-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 0], and point3 (time, 0) (without additional time substitutions) yields a constant derivative of [1 0 0].

Syntax

public static Vector3Bvr derivative( Point3Bvr pt );

Parameters

pt
Point3Bvr object.

Return Value

Returns the Vector3Bvr object.

distance

Statics Class

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

Syntax

public static NumberBvr distance( Point3Bvr p1, Point3Bvr p2 );

Parameters

p1 and p3
Point3Bvr objects.

Return Value

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.

Syntax

public static NumberBvr distanceSquared( Point3Bvr p1, Point3Bvr p2 );

Parameters

p1 and p3
Point3Bvr objects.

Return Value

Returns the NumberBvr object.

Remarks

This method is slightly more efficient than the distance method.

See Also

distance

point3

Statics Class

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

Syntax

public static Point3Bvr point3( NumberBvr x, NumberBvr y, NumberBvr z );

Parameters

x, y, and z
NumberBvr objects, specifying the coordinate values. The x specifies the distance along the x-axis from the origin to the point, y specifies the distance along the y-axis, and z the distance along the z-axis. These parameters can also be of type double.

Return Value

Returns the Point3Bvr object.

See Also

point3Spherical

point3Spherical

Statics Class

Creates a three-dimensional point behavior. The location of the point is given in spherical coordinates.

Syntax

public static Point3Bvr point3Spherical(
     NumberBvr XYangle,
     NumberBvr YZangle,
     NumberBvr length
);

Parameters

XYangle
NumberBvr object of the counter-clockwise XY angle, in radians, of the point about the positive y-ray. The angle begins at the positive z-ray, so that [0 0 1] has a XYangle of 0, and [1 0 0] has a XYangle of pi/2. This parameter can also be of type double.
YZangle
NumberBvrobject of the counter-clockwise XY angle object of the counter-clockwise elevation angle, in radians, of the point above the XZ-plane. A YZangle of pi/2 means the point is straight up (on the positive y-ray), and a YZangle of -pi/2 is straight down (on the negative y-ray). This parameter can also be of type double.
length
NumberBvrobject of the counter-clockwise XY angle object of the distance of the point from the origin. This parameter can also be of type double.

Return Value

Returns the Point3Bvr object.

Remarks

The following table correlates Cartesian coordinates with polar coordinates (X = Don't Care).
Cartesian coordinatesXYangleYZangleLength
[0 0 0] X X 0
[d 0 0] pi/2 0 d
[-d 0 0] -pi/2 0 d
[0 d 0] X pi/2 d
[0 -d 0] X -pi/2 d
[0 0 d] 0 0 d
[0 0 -d] pi 0 d

See Also

point3

sub(p1, p2)

Statics Class

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

Syntax

public static Vector3Bvr sub( Point3Bvr p1, Point3Bvr p2 );

Parameters

p1 and p2
Point3Bvr objects.

Return Value

Returns the Vector3Bvr object.

sub(pt, vec)

Statics Class

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

Syntax

public static Point3Bvr sub( Point3Bvr pt, Vector3Bvr vec );

Parameters

pt
Point3Bvr object.
vec
Vector3Bvr object.

Return Value

Returns the Point3Bvr object.

See Also

add


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