ray.pointAt
The point at parameter t along a ray: origin + t · direction.
Usage
Ray.pointAt(r: Ray, t: number): Point3Parameters
rRayThe ray. Required. In model.
tnumberThe parameter, in units of the direction’s length; a distance when the direction has length 1. Negative values are not rejected.
Returns
The point origin + t · direction; NaN when a coordinate is NaN or two infinities cancel.
Example
Ray.pointAt(Ray.of(Point3.of(1, 0, 0), Vector3.of(0, 2, 0)), 1.5) // → { x: 1, y: 3, z: 0 }