Simon contributed his own cloud for the Processing Community Day

Schermafbeelding 2017-10-06 om 18.39.37

In the video below, Simon is showing the cloud design he contributed to the community project collecting cloud designs for the Processing Community Day coming up on October 21, 2017. You can play with Simon’s design on the community project webpage created by Coding Train at

Simon’s cloud is called “Round Cloud”. Once you open it on the Coding Train Community Clouds page, the cloud changes its shape every time you click on it.


Circle-Rectangle Intersection (Collision)

Simon has been studying  various 2D collisions (via the p5.collide2D library and, especially the Circle-Rectangle Intersection (Collision). He was so busy with this problem that he even put it down in chalk at the playground:





And on the whiteboard at home:


And spent nearly his entire math lesson today talking about the math behind 2D object collision to his math teacher:





Simon also used Circle-Rectangle Collision for his awesome new Hero Game in Processing!


Interactive Math Functions

Simon was reading about math functions on Wikipedia and came up with an idea to create an interactive math functions editor in JavaScript that would visualize (i.e. show the graphs for) all the functions. Simon was especially excited about cosecant, secant and cotangent (csc, sec and cot for short), which were new to him:


Simon partially programmed the interactive math functions editor, but it remained unfinished:




Simon’s Codea Tutorials and the Arc-Tangent

A set of awesome Codea tutorials that Simon recorded for those who are just starting to program in Codea. Simon ported examples from Processing (java) into Codea (Lua):

In the second tutorial (in two parts), Simon explains how to write a physics simulation program in Codea using forces like gravity, friction and spring force. Anyone watching will get to use some trigonometry and see what arc-tangent is for! The original code in Java comes from Keith Peters (Processing).

Here are some notes from when Simon was explaining the arc-tangent to me the other day:



Simon’s changes to Daniel Shiffman’s Spherical Geometry Coding Challenge

Simon talks about his changes to Daniel Shiffman’s Spherical Geometry Coding Challenge: He has rewritten the code in an object oriented manner. Later he also turned the sphere into an ellipsoid using three radii.

Object oriented (Simon’s idea):

Adding colour (Daniel’s feature):

Turning the sphere into ellipsoid (Simon’s idea):

Simon would also like to try this with a cylinder:


Simon wanted to share his code in a readme in GitHub but he didn’t manage to create one within the specific (Sphere Geometry) project. Here is a screenshot of him sharing the code in Slack chat (for Coding Train fans):

Spherical Geometry sharing in Slack 29 Jun 2017

Magnitude of a 3D vector

Here Simon explains how to calculate the magnitude of a 3D vector. This is something he partially figured out on his own and partially learned from Daniel Shiffman’s tutorial on Trigonometry and Polar Coordinates.



Translating examples from The Nature of Code into Lua (Codea)

This morning Simon attempted to make a more difficult translation in the Codea app of an example from Daniel Shiffman’s book The Nature of Code (Java) into Lua. It concerned the Gravitational Attraction example from Chapter 2 of the book, Forces. Simon is happy with Codea because “It’s really readable!”, “You don’t need semicolons and parenthesis!” and all logic operators are actually typed in words (“and”, “or”, “not”).


Unfortunately, the function Simon introduced as substitute for mouse pressed release on the touch screen didn’t seem to work:

Simon did successfully translate the simple harmonic motion example from Chapter 3, Oscillation: “I use trigonometry!”

For this example, he had to look up a complex formula for mapping a range to another range on the internet b1 + (s – a1)*(b2 – b1)/(a2-a1) “because map function doesn’t exist in Codea, so I wrote that function”.

Swapping the axes:



Polar Roses in JavaScript

Simon created an engine that uses trigonometrical (polar coordinates) formulas to produce beautiful roses. He reproduced the code originally created by Daniel Shiffman from memory and searched for the formulas on Wikipedia.

You can play with this project here (click on the play button to run):