POV-Ray : Newsgroups : povray.binaries.images : Re: Moss Vine test [~30k] : Re: Moss Vine test [~30k] Server Time
1 Aug 2024 04:11:27 EDT (-0400)
  Re: Moss Vine test [~30k]  
From: Bill Pragnell
Date: 13 Mar 2009 11:05:00
Message: <web.49ba7553d4fd5b286dd25f0b0@news.povray.org>
"[GDS|Entropy]" <gds### [at] hotmailcom> wrote:
> "clipka" <nomail@nomail> wrote in message
> > trace() a ray from each point to the object's bounding box center.
>
> Ok, so a macro fills an array once with random positions on a sphere, then
> uses that array in a looped call to trace.

Or you could just do it on the fly.

> I thought trace() accepted only a point and an object? It can accept two
> points?

Trace takes an object id, a start point, a direction, and (optionally) a
previously-#declared vector in which it stores the surface normal at the point
found.

> > If you get an intersection point, test whether it is inside the other
> > object B.
>
> I'm a little fuzzy here...
> Assuming I had you right in my sentence above, what result from that trace
> would go within the #if block that would initiate the call to
> inside(myPoint,objectB)?

The aforementioned normal vector is set to <0,0,0> if the trace fails to hit
anything. Test the length of this vector using vlength().

Bill


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.