Re:Calculating the intersection area of 3 or more circles
by shuzchen on Tuesday June 30, 2015 @08:43PM
(#9809301)
I notice that when you're trying to calculate whether a point (p) is in a circle (c) you use euclidean distance:
If you're doing this test many, many times (especially as in a Monte Carlo simulation), it'd be more efficient to use distanceSquared:
Not having to calculate square roots will cut the compute time drastically.
[ Parent
| on HN ]
Re:Calculating the intersection area of 3 or more circles
by benfrederickson on Tuesday June 30, 2015 @09:03PM
(#9809405)
good point! I actually used this technique recently, to speed up a numerical optimization for laying out venn diagrams: http://www.benfrederickson.com/better-venn-diagrams/
I didn't think of it when I was writing this post though =(