VARKON Version 1.15 1996-04-20

> ## all_int_lin_sur - Function

> Calculates all intersect points between a surface and a line.
> Description.
> The function calculates all intersect points between a surface and a straight line. There are many options for the ordering of the intersect points.
> Syntax
> all_int_lin_sur(surface, p, v, order, start, nint, uv, xyz)

> REF | surface;
> VECTOR | p;
> VECTOR | v:
> INT | order;
> VECTOR | start;
> INT | nsol;
> VECTOR | uv ( );
> VECTOR | xyz ( );

> Principal parameters

> surface | - Identity of the surface
> p | - Position
> v | - Direction of the line (ray)
> order | - Method for the ordering of intersect points (the solutions).
> | Ordering is always with respect to the distance to the input R*3 point p but solution points will be omitted for the different cases. Eq. 1: All intersect points Eq. 2: Only intersect points in the v (shooting) direction Eq. 3: As 2 but only intersect points with surface normals that have the same direction as the v vector (the shooting direction) Eq. 4: As 2 but only intersect points with surface normals that are in the opposite direction as the v vector (the shooting direction) Eq. 5: As 3 but the number of solutions will be zero ( 0 ) if the first solution point has a surface normal that is in the opposite direction compared to vector v (the shooting direction) Eq. 6: As 3 but the number of solutions will be zero ( 0 ) if the first solution point has a surface normal that is in the same direction as the vector v

> nint | - Number of solution points

> Optional parameters

> start | - Start uv-value for faster numerical solution. vec(-1,-1,-1) = none = default
> uv | - Array with output U,V solutions (intersect points)
> xyz | - Array with output R*3 solutions (intersect points)

> Example
> VECTOR uv (10);
> all_int_lin_sur(#5, vec(100,20,30), vec(1,0,0), 2, ,uv )
> Calculates all intersect points between the line defined by point (100, 20, 30) and the vector ( 1, 0, 0)
> and the surface #5. Output solution points in uv will only be the points in the shooting direction.

VARKON Homepage | Index