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 & HelpSyntax Questions › help turning pseudo code sketch into viable code
Page Index Toggle Pages: 1
help turning pseudo code sketch into viable code (Read 334 times)
help turning pseudo code sketch into viable code
Feb 5th, 2009, 11:21pm
 
Hi

I am having trouble figuring out how to do something that appears kind of complicated...

I have a series of particles scattered about my display. I want to break them into ArrayLists - to be sent to a function that will generate convex hulls - and I want to specify a threshold distance that dictates when a new ArrayList should be created for that grouping.

so...

For all particles in my list

//separate particles into lists where the distance between each and every one within that list is less a threshold distance

measure the distance between each and every other particle

if that distance is more than threshold value
place particles in separate lists

i realize that's pretty sloppy and it needs to get way more explicit. I'm just having trouble picturing it...

any ideas are really appreciated...


Page Index Toggle Pages: 1