POV-Ray : Newsgroups : povray.general : Finding locus of intersection : Re: Finding locus of intersection Server Time
5 May 2024 13:18:24 EDT (-0400)
  Re: Finding locus of intersection  
From: Christian Froeschlin
Date: 18 Aug 2013 08:29:28
Message: <5210be28@news.povray.org>
> I mean without knowing the details of the guts of the POV-Ray source code, I'm
> just working by analogy, and looking at the output of the render engine.
> At the intersection, there ought to be some ... detectable change.

If you modified POV-ray to return some kind of object id for each
ray that is hit you could notice that neighboring pixels hit different
objects. You can emulate the same thing with trace().

However, if the object changes for two neighboring rays it can either
be an intersection, two objects that are "touching" or one object that
is in front of another object (the latter case can be mostly filtered
by checking how close the two ray "hit points" are in 3d space).

You could also direct more trace() calls at regions of interest
to find the intersection point with higher precision and possibly
attempt to actually "follow" a line of intersection.

But this technique limits detection of intersections to those that
are "visible" from some outside point. And all you get is a bunch of
points where intersections might occur.


Post a reply to this message

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