index

Varkon MBS Programmers manual


inv_on_sur - Function

Description

Returns the parameter value (u,v) of the position on a surface which is closest to a given point in R3.

Syntax

  uv_pos:=inv_on_sur(surface, pos, order, sno, start);

  ref    surface;
  vector pos;
  int    order;
  int    sno;
  vector start;
  vector uv_pos;

Principal parameters

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

Optional parameters

start - Start UV position for the calculation

Return value

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.

Example

  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).

Comments

The input point does not need to be exactly on the referenced surface.


SourceForge.net Logo

Varkon 1.19D svn # 120M