My Times Tables Visualization Poster has arrived! Will probably present this at @CC_Amsterdam @ProcessingOrg Community Day Amsterdam!

https://t.co/ChTg0eOLIn

# Tag: Processing

# 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!

# Creative Coding Utrecht MeetUp

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’s Times Tables Visualization

Simon shows his Times Tables Visualization in Processing (Java) and talks about how it’s connected to Mandelbrot Set. See the code with the README on GitHub: https://github.com/simon-tiger/times_tables

View the full animation here:

Simon writes: This is a visualization for the times tables from 1 to 200 (including the in-between numbers that are multiples of .01). I used modular arithmetic to write the code:

0. Start with a circle with 200 points (I’ve chosen 200, your number could be anything, but we’ll use 200 in the instructions).

1. 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).

2. We’ll first do the 2x table. 2×0=0, same thing so we don’t do anything. 2×1=2, so we connect 1 to 2. 2×2=4, so we connect 2 to 4, and so on.

3. 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.

4. Now you could keep going beyond 199, but actually, you’re going to get the same lines you already had!

5. You can now create separate images for the 2x table (which we’ve just done), the 3x table, the 4x table, the 5x table, and so on. You can even try in-between numbers (like 2.53) if you want.

In the program, you see an animated image at the left of the screen, and 4 static images (representing examples of times tables) to the right of that. They represent the 2x, 34x, 51x and 99x tables.

The idea of a times tables visualization comes from a video by Mathologer, but the code Simon wrote completely on his own.

# Live Stream #14. 15’s Puzzle Redo continued.

In this live session, Simon continue my 15s puzzle redo live session (“yet again, but I swear this is going to be the last time I do this!” Simon said). Here’s a link to the previous part. This week’s live stream went great, Simon kept it concise, didn’t panic while debugging, largely thanks to a wonderful supportive audience. And he even got some interesting personal questions asked in the end!

# Magic Cards in Base 3!

Simon has developed his version of the Magic Cards, this time in Base 3. He invented this system completely on his own and actually created a program in Processing (Java), using ternary function, to make the cards! The the code for creating the five cards in Processing and exporting the images as png files is available on Simon’s page on GitHub: https://github.com/simon-tiger/browns-criterion-base3

To play the game, have someone think of a number between 0 and 242 and let that person look for his/her number on every card and tell you which colour it is on every card. Every card stands for a power of 3: 81, 27, 9, 3, and 1. There are three grids of numbers on every card, a blue grid (representing the zeros in base 3), a red grid (representing the ones in base 3), and a green grid (representing the twos in base 3). After your friend has found his/her number on all the five cards, you can go ahead and add all the results up to guess the number. Alternatively, if you find working with base 3 too difficult, just sum up all the red numbers in the top left corners (on all the cards where your friend’s number was red), then double all the red numbers in the top left corners (on all the cards where your friend’s number was green) and add all of those together to guess the number.

Simon started out by actually trying to draw the magic cards:

But quickly realised he’s better off writing a computer program to fill in the grids. When the program (pretty tough to write) was finally ready, he tried to print a card out and… ran out of ink on our home printer. Next, we rushed to the print shop, as it was about to close.

“Mom, I can calculate why it says 17 million colours! It’s 256 cubed!” (255 for Red, Green and Blue plus one for alpha).

Simon previously developed a magic card system for Prime Numbers and wrote a Java program that guessed the numbers using powers of two.

# Liva Stream #13. Math Puzzle: Logic.

In this live session, Simon works a little on his 15s puzzle redo that he started in his previous live session: https://www.youtube.com/watch?v=ixkLFYcb0T0 and programs a math/logic puzzle, checking whether the statement “Every card with a T on one side has a 3 on the other” is true or false. The original puzzle comes from an old video by James Grime, recorded before Simon was born (the fact that Simon finds particularly funny):

# Reds and Greens

Simon has crafted a nice game today, inspired by a video in which mathematician Katie Steckles shows several mathematical games. Simon wasn’t sure what the game was called so he named it “Reds and Greens”. The objective of the game is to accumulate a set of three cards sharing the same property (such as the same number of green dots or red dots, the same total number of reds and greens or a set in which all the three possible variants – one, two and three dots of the same color – would be present). Each player pulls a card from the stack (all the cards are lying face up) and the one who collects a set first wins. Simon has actually programmed the cards in Processing (Java) – quite a strenuous task. Below is the jpeg pic of what he made and his code in Processing.

Simon also explained how the game is very similar to Tic Tac Toe, look at the photo below and you’ll see why:

# Live Stream #12: 15’s Puzzle Redo

Simon had quite an audience yesterday during his live lesson. In this week’s session, Simon remade his 15’s Puzzle in Processing and explained the math behind it. He plans to finish the puzzle during his next live stream in two weeks from now (on April 19 at 17:15 CET).