Simon took part in a Coding Train livestream in Paris!

Simon and Daniel Shiffman after the livestream

The video below is part of Daniel Shiffman’s livestream hosted by GROW Le Tank in Paris on 6 January 2019 about KNN, machine learning, transfer learning and image recognition. Daniel kindly allowed Simon to take the stage for a few minutes to make a point about image compression (the algorithm that Daniel used was sort of a compression algorithm):

Here is a different recording (in two parts) of the same moment from a different angle:


Advertisements

Simon’s Times Tables Visualization Poster

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

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

The Senses: Simulating Taste and Smell

You need 24 bits (8 bytes) to simulate color. That’s 24 ones and zeros. How many bits are necessary to simulate taste? Or smell?

Correction: You would need 584 bits to express smell, not 654 (Simon made a mistake in the original calculation).

The Senses: What color is the dress?

A couple of years ago this dress went viral on the internet as some people argued it was blue and black and others saw white and golden. To this day neuroscientists haven’t found an explanation to this. Simon analysed the actual colors as they appear on the screen using the ShareX app. So what color is the dress?

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.