This blog is about Simon, a young gifted mathematician and 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 has created animations visualizing sound waves (Triangle, Sawtooth, Square and Sine waves) in Processing (Java), using wave functions.

These are the functions he used for the Sawtooth, Square and Sine waves:

Not to confuse “sine” with “sgn” (sgn standing for sign):

He was inspired by the logarithmic and power functions that he was studying during his math class yesterday. Simon was trying to draw both types of functions in Grapher on his laptop, but only succeeded for the power functions (because there were no subscript option for the logarithms).

Simon created his very first video game completely on his own. Everything in this game he came up with by himself – from the original idea and design to the final code. The game is about a little man (actually, Simon himself) jumping over the waves in the sea. Every time he lands on an actual wave it’s game over.

Simon used collision detection (point-rectangle instead of rectangle-circle collision detection) and array lists to duplicate the waves. He created an illusion of 3D by choosing the viewing angle “almost as if it were an orthographic camera”, he explains.

The code for this game (in Processing i.e. Java) is available on GitHub at

Simon had trouble with the game over function. Originally, it was only triggered once the player clicked the mouse to jump again while on a wave, instead of reading to the circle-rectangle (little man-wave) collision. Simon asked about this problem in the Coding Train slack channel and got some great responses. Eventually he solved the problem is his own way (see the “Debugged” video):