Share full screen result
Embed on your page (embed options)
This week’s challenge is to find an elegant solution to generating elements in a spiral pattern. Consider the following diagram…
Your solution can be procedural or recursive, but in either case you will be dealing with a shrinking grid of possible locations for elements. The colours do not have to be in the result - they are only used to indicate the pattern.
Hint: Try defining variables for columns and rows so that the shape can change but the positioning and order remain the same.
XHTML 1.0 Strict
XHTML 1.0 Transitional
HTML 4.01 Strict
HTML 4.01 Transitional
HTML 4.01 Frameset
Framework <script> attribute
Echo apis are created to simulate Ajax calls:
/echo/json/ for JSON,
//jsfiddle.net/echo/jsonp/ for JSONP,
/echo/html/ for HTML and
/echo/xml/ for XML.
Please read API documentation and follow
Created and maintained by Piotr and Oskar.
Hosted by DigitalOcean.
Special thanks to MooTools community.
All code belongs to the poster and no license is enforced.
JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code.
Please read the documentation.
For updates please follow our blog,
or become a fan.