[sci.math] Wanted: line-crossing-volume algorithm

pvdl@tnoibbc.UUCP (Peter van de Leur) (02/09/90)

I am looking for a solution to the following problem:

I have a volume bounded by 6 planes that are not parallel nor perpendicular to 
one another (this element probably has a name, but I am not aware of it) . 
I have also got a straight line running in an arbitrary direction.
I need to know :
  1. whether the line crosses the volume
  2. If it crosses, what is the length of the cross-section.
The literature that I have access to gives me either very very basic 
information or only a general guideline how to solve this kind of problem.
Does anyone have a solution ready? I think that the finite-element post-
processor writers must have solved it, e.g. for contour generating; perhaps 
also the ray-tracer people did it.

Please mail any suggestions. As I have understood during my enquiries, more
people are interested, so I will certainly post any substantial results.

-- 
Peter van de Leur : TNO - IBBC              USENET : pvdl@tnoibbc
                  : PO-box 49               UUCP   : ..!hp4nl!tnoibbc!pvdl
                  : 2600 AA  Delft
                  : the Netherlands         VOICE  : +31 15 842313

root@cca.ucsf.edu (Systems Staff) (02/13/90)

In article <1393@tnoibbc.UUCP>, pvdl@tnoibbc.UUCP (Peter van de Leur) writes:
> 
> I am looking for a solution to the following problem:
> 
> I have a volume bounded by 6 planes that are not parallel nor perpendicular to 
> one another (this element probably has a name, but I am not aware of it) . 

I take it you intend this to be a distorted cube? You would need to
constrain the planes additionally to ensure this. The conditions
given could lead to a skewed hexagonal cylinder which would be unbounded.

In any case, the volume is defined by a set of linear inequalities
which say  which side of each plane the volume lies on.

> I have also got a straight line running in an arbitrary direction.

And this part is defined by linear equations.

> I need to know :
>   1. whether the line crosses the volume
>   2. If it crosses, what is the length of the cross-section.

Linear equations and linear inequalities?

Looks like a small linear programming problem from here. Is there
something I'm missing?


 Thos Sumner       Internet: thos@cca.ucsf.edu
 (The I.G.)        UUCP: ...ucbvax!ucsfcgl!cca.ucsf!thos
                   BITNET:  thos@ucsfcca

 U.S. Mail:  Thos Sumner, Computer Center, Rm U-76, UCSF
             San Francisco, CA 94143-0704 USA

I hear nothing in life is certain but death and taxes -- and they're
working on death.

#include <disclaimer.std>