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. Visit https://simontiger.com

Simon had his first public performance in front of a large audience last Saturday (February 9, 2019): he spoke about his Times Tables Visualization project at the Processing Community Day in Amsterdam!

Simon writes: You can access the code of the poster and the animation (and the logo for my upcoming company!) and download the presentation in PowerPoint, on GitHub athttps://github.com/simon-tiger/times_tables

If you’d like to buy a printed copy of the poster, please contact me and I’ll send you one. Status: 3 LEFT.

From where I got this I called this sketch Pool_pi because the original paper about this (written in 2003) was called something like Pi in Pool. I learned about this from a recent 3Blue1Brown series:

The idea The idea is 2 blocks on a frictionless surface. One slides towards the other, that is facing a wall. All collisions are perfectly elastic.

If the two blocks have the same mass, you can quickly calculate that there will be 3 collisions.

If the one block is 100x the other, it just so happens that there will be 31 collisions.

If the one block is 10000x the other, there will be 314 collisions (I get tired of making graphics). If the one block is 1000000x the other, there will be 3141 collisions.

That’s pi!

The issue!
In my own code, I first used Box2D.
It worked for mass ratios of 1 and 100, but it didn’t work for 10000.

Then I started writing my own physics engine, hoping to fix this issue. But it was even worse. I couldn’t even get 100 to work.

Then I figured that the blocks are colliding too frequently. So I slowed the 1st block down.
I could get 100 to work this way, but not 10000.

My Times Tables Visualization Poster has arrived! Will probably present this at @CC_Amsterdam @ProcessingOrg Community Day Amsterdam! https://t.co/ChTg0eOLIn

Simon has made an enormous poster from his earlier animated version of the Times Tables Visualization! Simon is hoping to present this project at the Processing Community Day in Amsterdam in January 2019. The poster is already being printed!

Simon writes: This is a visualization for the times tables from 1 to 200.
Start with a circle with 200 points. Label the points from 0-199, then from 200-399, then from 400-599, and so on (youâ€™re labeling the same point several times).

Weâ€™ll first do the 2x table. 2Ã—1=2, so we connect 1 to 2. 2Ã—2=4, so we connect 2 to 4, and so on.

2Ã—100=200, whereâ€™s the 200? It goes in a circle so 200 is where the 0 is, and now you can keep going. Now you could keep going beyond 199, but actually, youâ€™re going to get the same lines you already had!

For the code in Processing, I mapped the two numbers I wanted to connect up (call them i), which are in between 0 and 200, to a range between 0 and 2Ï€. That gave me a fixed radius (I used 75px) and an angle (call it Î¸). Then I converted those to x and y by multiplying the radius by cos(Î¸) for x, and the radius by sin(Î¸) for y. That gave me a coordinate for each point (and even in between points, so you can do the in between times tables as well!) Then I connect up those coordinates with a line. Now I just do this over and over again, until all points are connected to something.

Unfortunately, Processing can only create and draw on a window that is smaller than a screen. So instead of programming a single 2000px x 4000px poster, I programmed 8 1000px x 1000px pieces. Then I just spliced them together.

Simon programmed this grid of numbers and then used Paint to color the numbers in that are multiples of other numbers, an Eratosthenes way to look for prime numbers. When he compared his result to the prime number table that he found online it turned out to be a complete match!

Simon is programming a full implementation Logo code editor in p5.js (JavaScript), as part of Coding Train’s Logo Coding Challenge. Logo is a coding language that Simon says he has been learning via Turtle Academy, a site containing 20 lessons. He has already created most of the editor (got as far as lesson 17 on Turtle Academy) but got stuck with the fill function in Logo (he doesn’t know how to program the fill function). Can anyone help him out? Simon’s code is online at: https://editor.p5js.org/simontiger/sketches/BknVvCFTm

What a blissful day at Creative Coding Utrecht! Simon also got a chance to show a few of his projects in Processing to a cool and understanding audience!

Simon created three optical illusions in Processing (Java) playing with color. For better effect, you can download Simon’s code on GitHub: https://github.com/simon-tiger/colorIllusions

The Part 1 video is about the first two illusions. The third (and the coolest) illusion is in Part 2.

Simon writes:
Illusion 1: A checkerboard with blue and yellow squares, but if you move away from it, you see white.
Illusion 2
Mode 1: A disk with red and green, but when you spin it, it becomes yellow.
Mode 2: A disk with red and cyan, but when you spin it, it disappears.
Illusion 3: A rainbow of colors, but when you pause it from flickering, you only see red, green, and blue.

If Illusion 2 Mode 2 doesn’t work, change the background from 255 to between 128 and 135.
If any of the other illusions don’t work, try doing them on a different screen.

Simon is working on a project that will involve constructing the Archimedean solids from paper pieces that he programs in Processing (Java) and prints out. In the previous video, Simon worked out the distance between two points to measure the side length of a pentagon that has the radius of 1 (i.e. the distance between its adjacent vertices if the distance from its center to its vertices is 1). He first made a mistake in his calculation and got a result that would be true for a hexagon, not a pentagon. He then corrected himself and got the value that he thought he could use in the Processing code, but as it turned out, the ratio between the radius and the side length was still not right. We recorded a whole new video full of calculations and playing with the code, and achieved pretty neat results after Simon used the new value in the code, but still not good enough, as Simon wanted to have his pentagons to have the side length of 40 (to match the triangles and the squares he’d already made). Simon later found a solution using a different formula for a polygon with n sides (from trigonometry, defining the radius as the side length over (2sin times 180/n)) and succeeded in getting exactly the pentagons he wanted, with the side equalling 40. See the result here: