POV-Ray : Newsgroups : povray.off-topic : Bounding circle intersection : Re: Bounding circle intersection Server Time
4 Sep 2024 17:19:21 EDT (-0400)
  Re: Bounding circle intersection  
From: bart
Date: 10 Dec 2009 10:33:22
Message: <4b2114c2$1@news.povray.org>
On 12/10/2009 04:34 AM, Slime wrote:

> And then, since the radii are positive, the right hand side can be changed
> to the following, but the test will now succeed more often than it should:
>
> distSq<  radius1Sq + radius2Sq + 2 * max( radius1Sq, radius2Sq )
>
> So now we have a test that doesn't require taking any square roots, but it
> isn't as "tight" as it could be - it will return true sometimes when the
> circles aren't intersecting.
>
> Can this be improved?
>

Have you tried this condition?

((distSq < (radius1Sq+radius2Sq))
or (4*radius1Sq*radius2Sq > (distSq - (radius1Sq+radius2Sq))^2))


Post a reply to this message

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