20 Determining Point Relative Ratios

20 Q3Point2D_RRatio

You can use the Q3Point2D_RRatio function to find a point lying between two given two-dimensional points that is at a desired distance ratio from one of those points.

TQ3Point2D *Q3Point2D_RRatio (
const TQ3Point2D *p1, 
const TQ3Point2D *p2, 
float r1, 
float r2, 
TQ3Point2D *result);
p1 A two-dimensional point.
p2 A two-dimensional point.
r1 A floating-point number.
r2 A floating-point number.
result On exit, the two-dimensional point that is at a desired distance ratio from p1 along the line segment between p1 and p2.

DESCRIPTION


The Q3Point2D_RRatio function returns, as its function result and in the result parameter, the two-dimensional point that lies on the line segment between the points p1 and p2 and that is at a distance from the first point determined by the ratio r1/(r1 + r2).

DESCRIPTION

3D Graphics Programming with QuickDraw 3D - 17 OCT 1995

© Apple Computer, Inc.

Let us know what you think of these prototype pages.

Generated with Harlequin WebMaker