POV-Ray : Newsgroups : povray.general : Testing for intersection of two objects : Re: Testing for intersection of two objects Server Time
31 Jul 2024 22:21:24 EDT (-0400)
  Re: Testing for intersection of two objects  
From: Nekar
Date: 25 Jul 2006 08:13:41
Message: <44c60af5@news.povray.org>
"NEWS" <pen### [at] caramailfr> wrote in message 
news: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 ..
>
>
Fine for boxes only. anything else will test wrong. The corners of two 
sphere's bounding boxes could intersect without the sphere's intersecting 
each other at all. May be it's possible to test it by using the mathematical 
formula for each object instead - I'm not sure.


-- 
-Nekar Xenos
"The truth is out there"


Post a reply to this message

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