Geom.pointAtSegmentXZ()
Description
Returns a point in parameterized position of the segment, specified by t. The method returns the initial point of the segment, if t = 0, and its end point, if t = 1. For calculations, the x and z coordinates are used.
Syntax
JSGeom.pointAtSegmentXZ(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.pointAtSegmentXZ(p1, p2, 0.5)
console.info(p3) // output:
|
Last update: 14 August 2025, 18:47