Skip to content

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

JS
Geom.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

Type Description
Point3 Returns a point of type Point3.

Example

JS
1
2
3
4
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:

See also

Last update: 14 August 2025, 18:47