Archives for May 2010

Ulam spiral, take 2

Mostly this is posted for its pleasantly recursive nature. In response to many people asking me how I made the Ulam Spiral, I have produced a a PDF of the spiral which includes the code to make said PDF. I really like how it turned out. One subtle touch that fellow Python programmers will appreciate [...]

Ulam Spiral Algorithm

I looked at many things online which detail how to draw the Ulam Spiral, and all of them use various bad-sounding algorithms. I recently drew the Ulam Spiral and it went very quickly and the algorithm I used was both straightforward and basic-sounding. So I will reproduce it below so that others won’t have to [...]