snap_point_to
Pulls a vector positions to the closest point on an object.
Signatures
- snap_point_to( solid obj, vector pos )
Details
The function finds the closest point for a given vector positions on an object obj.
Example
solid sph = sphere( 5 )
vector point = <[ 10, 0, 0 ]>
vector closestPoint = snap_point_to( sph, point )
echo( closestPoint )
Output
<[5,0,0]>
Return value
Returns a vector that is the closest point on obj.
Parameters
- obj
-
Geometric object the closes point is determined on.
- pos
-
A start position.