POV-Ray : Newsgroups : povray.general : Testing for intersection of two objects : Re: Testing for intersection of two objects Server Time
31 Jul 2024 22:13:23 EDT (-0400)
  Re: Testing for intersection of two objects  
From: NEWS
Date: 25 Jul 2006 07:01:35
Message: <44c5fa0f$1@news.povray.org>
well , from what i have see

Povray uses a default value min_extent() of -1 , if the object exists or not
, and use a default value max_extent() of 1 if the object exist or not

then if i use this
#local U=intersection { box {0,1}  box {2,3}}

and

#local U2= object {U scale 1000}

if the object  U doesnt exists then we will always have

[max_entent(U2) - max_entent(U) ].x = 0     and
[max_entent(U2) - max_entent(U) ].y = 0     and
[max_entent(U2) - max_entent(U) ].z = 0

and


[min_entent(U2) - min_entent(U)].x =0 and
[min_entent(U2) - min_entent(U)].x =0 and
[min_entent(U2) - min_entent(U)].x =0




In brief ..scaling a non existing object will give the same min_extend value
and max_extend value that the non-scaled object .. if not then the object
always exists ..




























news:44c54897$1@news.povray.org...
> Mike the Elder wrote:
> > Is there a reasonably simple way in POV-Ray to produce a Boolean value
> > representing whether or no two objects intersect?
>
>    Don't pay too much attention to the other answers because in the
> generic case what you ask is just not possible (not even in theory,
> at least not in a reasonable time with perfect accuracy).
>
>    You could use a *really* slow method of sampling points inside the
> bounding box of one of the objects and seeing if a point is inside
> both objects, but this would be very slow and quite inaccurate (you
> could, of course, increase accuracy by taking more samples, but there
> would still be a margin of error and the amount of time required
> probably grows by the power of 3).


Post a reply to this message

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