POV-Ray : Newsgroups : povray.general : Problem with trace() - how to test for ray directions other than towards or= : Re: Problem with trace() - how to test for ray directions other than towards or= Server Time
31 Jul 2024 10:27:47 EDT (-0400)
  Re: Problem with trace() - how to test for ray directions other than towards or=  
From: Thomas de Groot
Date: 19 May 2007 09:42:50
Message: <464efeda$1@news.povray.org>
"Yadgar" <yaz### [at] gmxde> schreef in bericht 
news:web.464ec550a6148d97cd5f50d20@news.povray.org...
> High!
>
> I want to place objects randomly on an isosurface; as the isosurface lies
> perpendicular to the y axis, I tested for directions parallel to the y 
> axis
> rather  than pointing towards <0, 0, 0>.
>
> But obviously all these rays missed - in a #warning output line, I always
> get 0.00000 for the x and z components of trace(). What went wrong? Is it
> in fact impossible, as the manual suggests, to safely test for
> intersections other than
> (Object, start_vector, -start_vector)? I even defined an auxiliary object
> and translated it so that the starting point is exactly above the origin,
> but this also failed...
>

example:
#declare Norm = <0, 0, 0>;
#declare Start = <x-pos, 20, z-pos>;

testing for an intersection on a surface perpendicular to y, would be 
written as:
#declare Inter=
  trace ( MySphere, Start, -y, Norm );
  etc....
  )

That is how I do it.

Thomas


Post a reply to this message

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