Simon speaking at the Processing Community Day in Amsterdam

https://www.youtube.com/watch?v=hiogZlqHf4Q

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 at https://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.

One of the tweets about Simon’s presentation

Advertisements

Simon’s code for an intriguing problem from the 3Blue1Brown math channel


The number of collisions between two objects equals a number of digits of Pi. The code on GitHub: https://github.com/simon-tiger/Pool_Pi

Simon writes:

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:

1st video: https://www.youtube.com/watch?v=HEfHFsfGXjs
2nd video: https://www.youtube.com/watch?v=jsYwFizhncE
3rd video: [not out yet]

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.

Can anybody help to fix this issue?

I borrowed part of the code from here: https://processing.org/examples/circlecollision.html

Simon’s Times Tables Visualization is Now a Huge Poster!

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.

Idea: Times Tables, Mandelbrot and the Heart of Mathematics video by Mathologer
Code: by Simon Tiger
Download the animated version here: https://github.com/simon-tiger/times_tables

Looking for Primes

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!

Prime Numbers 14 Nov 2018

Optical Illusions in Processing (Java)

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.

Inspired by Physics Girl videos.

 

 

Simon’s Archimedean Solids Project

https://youtu.be/dYBZXFW4bsg

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:

https://www.youtube.com/watch?v=f4unEptU3Vs&t=1s

The winning formula:

If you are really into working out the calculations, feel free to check out our frantic attempts here:

https://youtu.be/TuVqc5A08es