We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Place shapes on sketch without intersection
Page Index Toggle Pages: 1
Place shapes on sketch without intersection (Read 820 times)
Place shapes on sketch without intersection
Aug 26th, 2009, 10:13am
 
Seems like an obvious solution must be there, but ....

How do I place some circles on the sketch without any intersections?
Re: Place shapes on sketch without intersection
Reply #1 - Aug 26th, 2009, 10:23am
 
circles are touching iff
 (distance between their midpoints) <= (sum of their radii)

so if you're picking random locations, I'd say check against existing circles and try again while ( you hit that condition )
Re: Place shapes on sketch without intersection
Reply #2 - Aug 26th, 2009, 10:35am
 
if you have different shapes. maybe this post helps : http://processing.org/discourse/yabb2/?num=1233370178
Page Index Toggle Pages: 1