accessArray

To view this content, you need to install Java from java.com

 [Source Code: accessArray ] [Built with Processing]

Based of blackHole, written by John Beech - 2005|06|22.

This applet accessed an array from its centre outwards, spiralling around clockwise until there are no elements left.
The method nextHit() relies on several variables to keep track of where it is in the array, including the width/height of the array theta, and a check in the actual array to see if data has been set already.

Next hit will continue to run until all the array elements are hit, calculated roughly by aryWidth*1.5 and aryHeight*1.5. When nextHit exceeds this boundary it will return false. When false is detected, the array turns blue to mark completion. This bit of the process isn't very efficient - I can't think of a way to make it efficient, but it works, and thats what matters.