|
|
In article <Xns### [at] povrayorg>, ingo <ing### [at] homenl>
wrote:
> > I am told that I need 3d integrals to figure out the
> > points to fill a given space with random lines with-
> > out going outside that space...
>
> VRand_In_Obj(Object, Stream) in rand.inc can be of help here.
For random points, it won't be very useful for random lines unless the
shape is guaranteed to be convex. For example, if you have a torus, it
is very easy to have a line with the end points inside but which goes
outside the shape. You need to check the end points and a lot of points
along the line using the inside() function, or (faster and more
accurate) use the trace() function to trace a ray along the line from
one end point and check for an intersection closer than the other end
point.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|