Skip to content

Geom.pointAtSegmentXY()

Description

Returns a point in the parameterized position of a segment, indicated by t. The method returns the initial point of the segment if t = 0, and its ending point if t = 1. Coordinates x and y are used for calculations.

Syntax

JS
Geom.pointAtSegmentXY(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 0 to 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.pointAtSegmentXY(p1, p2, 0.5)
console.info(p3) // output:

See Also

Last update: 14 August 2025, 18:47