This blog is about Simon, a young gifted programmer, who had to move from Amsterdam to Antwerp to be able to study at the level that fits his talent, i.e. homeschool.

Simon’s first own code: Archimedean spiral in Processing (Java).

This is so exciting! Simon has written his first Java code completely on his own! It’s an animation of the Archimedean spiral (well, we only found out later that it’s actually called this way and that it was already discovered in the 3rd century BC).Simon built his spiral playing with polar coordinates in Processing. The first version of the spiral continued to move infinitely, beyond the canvas, so Simon came up with a way to make it stop (used a constrain).

He was so modest as not to say it was his own code and only confessed it tonight when I asked which tutorial or coding challenge this was. “None”, he answered, “I made it up myself”. He then started jumping around with joy. I told him he should post his code on GitHub, which he did. Here is the link: https://github.com/simon-tiger/archimedean-spiral/blob/master/Polar.pde

The following three videos show the making of the spiral step by step, with Simon’s explanations.

Here Simon creates the grid with the x- and the y-axes:

The first version of the spiral that went on forever:

Simon came up with the constrain to control the spiral:

Archimedean spiral (aka arithmetic spiral), a locus of points corresponding to the locations over time of a point moving away from a fixed point with a constant speed along a line which rotates with constant angular velocity.

The next two videos (in Dutch) are of Simon running Git from command line to show Dad how that works and ultimately placing his code on GitHub. We were quite amazed at his fluent use of BASH, considering he only used Git just once before, approximately a moth ago.

And this is what Simon did afterwards, at 10 pm, as I was trying to finally get him to bed (copying polar shapes formulas from Wikipedia):

He fell asleep asking me what was the γ in those examples…

## One thought on “Simon’s first own code: Archimedean spiral in Processing (Java).”