Serindipitous Circles

A long time ago, I had an IMSAI 8080 that I built from a kit.  I was working on laser shows at the time and was experimenting with a hand built DAC board for the 8080.  I saw this article in BYTE Magazine called Serindipitous Circles.  The algorithm was real simple but produced some interesting patterns that could be displayed on an oscilloscope.  Graphics displays were hard to come by at the time.

I noticed that the Auduino Due had two built-in DACs, so this was the perfect thing to try on the Due!

The article can be seen here.

I made a quick video with my cell phone.

Here’s the code:

/* Serendipitous circles algorithm from
Byte magazine February 1977
By Craig Newswanger
*/
// Variables
int x,y,xnew,ynew,j;

void setup() {
analogWriteResolution(12);
}
void loop()
{
x=random(32768);
y=random(32768);
for (j=0;j<80000;j++)
{
analogWrite(DAC0,x);
analogWrite(DAC1,y);
xnew=x-y/2;
ynew=y+xnew/2;
x=xnew;
y=ynew;
}
}

  1. No comments yet.

SetPageWidth