Varkon MBS Programmers manual
Returns the parameter value (u,v) of the position on a surface which is closest to a given point in R3.
uv_pos:=inv_on_sur(surface, pos, order, sno, start); ref surface; vector pos; int order; int sno; vector start; vector uv_pos;
surface | - Identity of the surface |
pos | - Position in R3 |
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 |
start | - Start UV position for the calculation |
uv_pos is the (u,v) parameter value for the closest point on the surface. The third component of uv_pos will be negative if there is no closest point.
uv_pos:=inv_on_sur(#5, vec(100,100,100), 1, 1);
The parameter value on surface #5 for the point which is closest to the R*3 point (X, Y, Z)=(100,100,100).
The input point does not need to be exactly on the referenced surface.
Varkon 1.19D svn # 120M