Returns the linear interpolation between p1 and p2 at ratio. A value of 0.0 for ratio will return p1, and a value of 1.0 will return p2. Numbers outside the range 0 through 1 are permissible.
Interp ( p1 As Point, _ p2 As Point, _ ratio As Number ) As Point
Argument | Type | Description |
---|---|---|
p1 | Point | First point on the reference line. |
p2 | Point | Second point on the reference line. |
ratio | Number | Ratio of the distance between the first point and the return point over the distance between the two input points . This value can be outside the 0 through 1 range if desired. |
Intent >interP(point(0,0,0), point(1,0,0), 0.5) --> Point_(0.5, 0.0, 0.0, WorldFrame())This is the same result as using the midPoint() function.
Intent >interP(point(0,0,0), point(1,0,0), -0.5) --> Point_(-0.5, 0.0, 0.0, WorldFrame())Negative ratio values are allowed.