Distributing points over a surface within boundries
Posted
by
vise
on Stack Overflow
See other posts from Stack Overflow
or by vise
Published on 2011-01-03T00:47:46Z
Indexed on
2011/01/03
1:54 UTC
Read the original article
Hit count: 471
algorithm
I'm interested in a way (algorithm) of distributing a predefined number of points over a 4 sided surface like a square.
The main issue is that each point has got to have a minimum and maximum proximity to each other (random between two predefined values). Basically the distance of any two points should not be closer than let's say 2, and a further than 3.
My code will be implemented in ruby (the points are locations, the surface is a map), but any ideas or snippets are definitely welcomed as all my ideas include a fair amount of brute force.
© Stack Overflow or respective owner