POV-Ray : Newsgroups : povray.advanced-users : Object Exists check? Server Time
1 Nov 2024 01:26:16 EDT (-0400)
  Object Exists check? (Message 1 to 2 of 2)  
From: CShake
Subject: Object Exists check?
Date: 15 Sep 2009 18:36:17
Message: <4ab016e1$1@news.povray.org>
After searching through many previous posts on this topic, I can see 
that the only way to really check for the existence of an object after 
an intersection or subtraction CSG is by running trace rays through the 
entire bounding box or searching with inside().
I also understand that the bounding box of any intersection is 
calculated as the intersection of parent bounding boxes.

Not knowing exactly what other information is available to the parser 
(besides bounding box), is there any chance of a 'bool = exists(Object)' 
function or the like? Not needing it to return any location or anything 
about the object, just a way of checking if there is indeed something 
visible (technically existing, as objects could be transparent) left 
after a CSG operation? Having that a compiled function could 
significantly increase speed over the 2000 or so iteration macros 
currently used.

If the code doesn't allow for any reasonable implementation, oh well, 
but it could be useful to have.

Chris


Post a reply to this message

From: Warp
Subject: Re: Object Exists check?
Date: 15 Sep 2009 18:39:47
Message: <4ab017b3@news.povray.org>
In the general case it's not possible to tell analytically whether two
surfaces intersect or not (which is what would be required to know if a
CSG operation makes an object completely disappear).

  An approximation could be made numerically, but it would be laborious
and slow (and not 100% fool-proof).

-- 
                                                          - Warp


Post a reply to this message

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