Happy Pi Day
Happy Pi Day (March 14 or 3/14 as we write here in the US)!
This reminded me of an article in ANALOG Computing that draws a circle using smaller and smaller lines.
After a little digging, the article is called CalcPi and is from the February 1986 ANALOG Computing (Issue 39).
The article has a C version for the Atari ST (one of the first ST listings published by the magazine) and a BASIC version for the Atari 8-bits. I typed it in so that you don’t have to. You can download the XFD with the file, called “CALCPI.BAS” on it.
When you run the program you get a better circle after each iteration. Here it is running in Graphics Mode 8 (320x160):
A few years ago I even did a translation of the C version into Xojo so you can run it on modern computers, although running the Atari version I just realized the Xojo version only shows the edges and not the full triangles. I should probably get that updated!