POV-Ray : Newsgroups : povray.advanced-users : Solve edge case: is point inside/on object : Re: Solve edge case: is point inside/on object Server Time
29 May 2024 11:38:53 EDT (-0400)
  Re: Solve edge case: is point inside/on object  
From: ingo
Date: 26 Dec 2018 09:13:30
Message: <XnsA9C49AE1123ECseed7@news.povray.org>
in news:web.5c23888fb6169bfa48892b50@news.povray.org jr wrote:

Part of the solution to the problem is not creating part of the problem 
in the first place. 

While having my afternoon walk to the groceries I thought, what if I 
don't intersect with the sphere. All computations are done on or within 
the unit sphere, that automatically gives me an implicit intersection.

If I only deal with the cone I get rid of the "rim" problem and the 
method with tracing through the point to be tested will always work. 
Trace through the point and compare the intersection with the point, if 
they are equal the point is on the surface and I count it as in.

Also inside testing will be easier as points on the spherical part of 
the intersection are now inside the cone instead of on the surface.

> what have I overlooked?

The red sphere is not the problem, its the cyan one you don't see. To 
see it comment out the yellow 'Inter' spheres.

I guess I've not explained the problem well, it's rather complex and 
needs quite a few steps.

Thanks,

ingo


Post a reply to this message

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