Geom.pointAtSegment()
Description
Returns a point in the parameterized position of a segment, specified by t. The method returns the initial point of the segment if t = 0, and its final point if t = 1.
Syntax
JSGeom.pointAtSegment(p1: Point3, p2: Point3, t : Number) -> Point3
Parameters
Parameter |
Type |
Default Value |
Mandatory |
Description |
p1 |
Point3 |
— |
 |
First point of the segment. |
p2 |
Point3 |
— |
 |
Second point of the segment. |
t |
Number |
— |
 |
Parameterized position of the segment (usually between 0 and 1). |
Return value
Example
JS |
---|
| let p1 = Geom.point3(0, 0, 0)
let p2 = Geom.point3(100, 100, 100)
let p3 = Geom.pointAtSegment(p1, p2, 0.5)
console.info(p3) // output:
|
Last update: 14 August 2025, 18:47