POV-Ray : Newsgroups : povray.general : Ray intersection test: Can't get my epsilon value right. I think. : Re: Ray intersection test: Can't get my epsilon value right. I think. Server Time
30 Jul 2024 12:25:38 EDT (-0400)
  Re: Ray intersection test: Can't get my epsilon value right. I think.  
From: triple r
Date: 6 Feb 2009 22:30:01
Message: <web.498cff5b40536681ef2b9ba40@news.povray.org>
"[GDS|Entropy]" <gds### [at] hotmailcom> wrote:
> Greetings,
>
> I am working with the ray intersection macro provided by triple_r, which
> works well, but I can't seem to get my epsilon value right. I think. Or I'm
> doing something else wrong...maybe. (thought I'd just post the question with
> the image, instead of three seperate posts to three seperate forums[image,
> source and question, respectively]...seemed a better choice..apologies if I
> was wrong)
>
> What seems to happen is that with epsilon of 1.0-e10, only 1/2 of the glows
> are drawn, including the wrong ones. Using 1.0e-1 I can get all of the glows
> to draw, including the wrong ones. Values in between change little.
>
> The ray intersection method seems to work fine for a single object like a
> cube at e-10. Additionally it does not appear to matter which object I test
> against.

Uh oh.  I think it is likely that 1e-10 may just be too small.  Or is it
possible that the sign may need to be changed?  The whole idea of some
tolerance was that the glow should be drawn even if it is coincident with the
surface, so you need to add a small amount to the distance to the surface when
you compare it to the distance to the glow.  I wrote it very quickly and only
tested it with that case, but it seems something between the two *should* work.
 Of course if the phony epsilon is less than the real epsilon, it's useless.
Without a concrete, simple example of where it fails, it's hard to say.  My
advice would be to go through the macro very carefully and get a firm grasp on
the vector math.  The trace function is not so bad once you understand what it
is doing:

http://www.povray.org/documentation/view/3.6.1/229/

 - Ricky


Post a reply to this message

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