VARKON Version 1.16 1998-04-27

> ## all_int_lin_msur - Function

> Calculates all intersects between a line and multiple surfaces
> Description.
> This function calculates all intersects between a line and multiple surfaces. It is basically the same routine as all_int_lin_sur() but with the difference that it operates on a set of surfaces instead of one single surface.

> all_int_lin_sur() should be used when only one surface is involved and you want to speed up computations by supplying an approximate start value. all_int_lin_msur() does not take a start value as input.

> all_int_lin_msur() should be used when multiple surfaces are involved. It will then compute faster than if all_int_lin_sur() was called indivudually for each surface.
> Syntax
> all_int_lin_msur(sur_in, nsur, p, v, order, nint, uv, xyz, sur_out)

> REF | sur_in();
> INT | nsur;
> VECTOR | p;
> VECTOR | v:
> INT | order;
> INT | nint;
> VECTOR | uv( );
> VECTOR | xyz( );
> REF | sur_out( );

> Principal parameters

> su_in | - Array of surface id:s
> nsur | - Number of surfaces
> p | - Line start position
> v | - Direction of the line
> order | - Method for the ordering of intersect points.
> | 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 output intersects.

> Optional parameters

> uv | - Array with output (U,V)-values
> xyz | - Array with corresponding R*3 (X,Y,Z)-values
> sur | - Array with corresponding surface id:s

> Example

> REF sur_in(2);
> INT nint;
> VECTOR uv (10);

> sur_in(1) := #5;
> sur_in(2) := #35;

> all_int_lin_msur(sur_in, 2, vec(100,20,30), vec(1,0,0), 2, nint, uv);
> Calculates all intersects between the line defined by point (100,20,30) and the vector (1,0,0)
> and the surfaces #5 and #35. All nint intersects in the shooting direction are returned in uv.

VARKON Homepage | Index