POV-Ray : Newsgroups : povray.off-topic : Bounding circle intersection : Re: Bounding circle intersection Server Time
4 Sep 2024 23:18:47 EDT (-0400)
  Re: Bounding circle intersection  
From: Slime
Date: 10 Dec 2009 21:48:13
Message: <4b21b2ed$1@news.povray.org>
> How about more simply:
>
> distSq < 4 * max( radius1Sq, radius2Sq )
>
> Followed by the expensive square root operation to check if they really 
> intersect?

Well, I'd have to weigh the cost of doing the square root against the cost 
of just going forward and doing the more expensive test. Although I posed 
this as a stand-alone question, the actual work I am doing is checking if a 
line segment intersects a triangle.

There's probably a bunch of ways to make my code faster, but I became 
curious about this particular problem.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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