POV-Ray : Newsgroups : povray.binaries.animations : Trace and its flexibility (considering Particles) : Re: Trace and its flexibility (considering Particles) Server Time
20 Jul 2024 01:18:50 EDT (-0400)
  Re: Trace and its flexibility (considering Particles)  
From: Mike Williams
Date: 5 Dec 2001 21:40:53
Message: <UW4yKDAmotD8EwCG@econym.demon.co.uk>
Wasn't it Tim Nikias who wrote:
>Hi Ho there people!
>
>I heard a lot about the trace-function, but, since I didn't download a
>beta
>of 3.5 yet, I don't know, how it actually works and what it's suitable
>to
>do.
>
>I've heard that it can only check if two objects intersect, and that
>certain variables can be used to check the actual intersection point.
>
>Is there a function, with which you can take a position, shoot a ray
>into a given direction, and have POV-Ray return the distance until
>the ray hits an object?
>
>Or have a gotten something completely mixed up?

You are a bit mixed up. Trace does just what you want.

Trace shoots a ray in a given direction and returns the point where the
ray intersects the surface and the direction of the normal at that
point. (If you really want the distance you would then use vlength()).

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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