Function PathUtilities.GetSpiralPoints

GetSpiralPoints (int count, float clearance)

Returns points in a spiral centered around the origin with a minimum clearance from other points.

Public Static
List<Vector3> GetSpiralPoints (

int

count

float

clearance

)

Returns points in a spiral centered around the origin with a minimum clearance from other points.

The points are laid out on the involute of a circle

See

http://en.wikipedia.org/wiki/Involute Which has some nice properties. All points are separated by clearance world units. This method is O(n), yes if you read the code you will see a binary search, but that binary search has an upper bound on the number of steps, so it does not yield a log factor.

Note

Consider recycling the list after usage to reduce allocations.