VARKON Version 1.15 1997-10-24
inv_on_sur - Function
Geometrical function
Description
Returns the parameter point of a position on a surface.
The function calculates the closest point to the given input point.
Syntax
inv_on_sur(ref, p, order, sno, uv)
REF ref; VECTOR p; INT order; INT sno; VECTOR uv;
Principal parameters
ref - Identity of the surface p - Position order - Method for the ordering of closest points (the solutions) Eq. 1: With respect to the distance to the input R*3 point Eq. 2: With respect to the input UV start point
sno - Requested solution number
Optional parameters
uv - Start UV point for the calculation
Return value
A VECTOR that is the parameter point on the surface for the closest point on the surface.
The third component of the output vector will be negative if there is no closest point.
Example
uv_value:=inv_on_sur(#5, vec(100,100,100), 1, 1);
The parameter point on surface #5 for the point which is closest to the R*3 point (X, Y, Z)=(100,100,100).
Comments
The input point p need not to be exactly on the referenced surface.