Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcla1/ulam
Given a size and x,y coords will return the value from a number spiral.
https://github.com/jcla1/ulam
Last synced: about 2 months ago
JSON representation
Given a size and x,y coords will return the value from a number spiral.
- Host: GitHub
- URL: https://github.com/jcla1/ulam
- Owner: jcla1
- Created: 2012-12-24T18:46:27.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-24T18:52:10.000Z (about 12 years ago)
- Last Synced: 2024-04-14T15:48:43.424Z (10 months ago)
- Size: 105 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ulam
====Spiral Matrix function for Ulam Spirals
The main function ulam([x,y], dimention) generates a spiral matrix of width and height -> dimention, and tells you what the value
is at position x, y in that matrix. Note that 1,1 is in the top left corner of a matrix.
See [Ulam Spiral rectangular grid construction] (http://en.wikipedia.org/wiki/Ulam_spiral#Construction) for more
details.This was mostly a mental exercise.