Coding, Geometry Joys, JavaScript, Milestones, Murderous Maths, Simon teaching, Simon's Own Code, Simon's sketch book

Space-filling Curves in p5.js.

Simon prepared this project as a community contribution for The Coding Train (Simon came up with his own way to draw the Hilbert Curve and added interactive elements to enable the user to create other colourful space-filling curves (Hilbert Curve, Z-order Curve, Peano Curve and more!). You can see Daniel Shiffman’s Hilbert Curve tutorial and coding challenge on The Coding Train’s website (including a link to Simon’s contribution) via this link:

Interactive full-screen version, allowing you to change the seed and the grid size:


Screen shot of The Coding Train website with a link to Simon’s contribution
Contributing, Geometry Joys, Group, Math and Computer Science Everywhere, Math Riddles, Milestones, Murderous Maths

Simon solving Brilliant's daily challenges

Simon keeps thoroughly enjoying Brilliant’s approach to intelligence and learning (even though he sometimes dislikes the way the daily challenges are formulated). His latest stats:

From the courses he has done most I conclude he’s mostly into Computer Science and real world problem solving at the moment:

Below are some screen shots of the daily challenges he was especially curious about lately and also excerpts of his taking part in Brilliant’s discussions:

Simon contributing to the discussion of the January 2 challenge
January 13 challenge

I noticed it’s a cyclic quadrilateral and I know that the opposite angles of a cyclic quadrilateral have to add up to 180 degrees. At first I thought: How am I even going to go about doing it, because it’s so cryptic and so full of information. But once I solved it, it actually became quite easy to draw!

February 4 challenge
Geometry Joys, Murderous Maths, Simon teaching

Hyperbolic space

This is a model of hyperbolic space (7 triangles around a vertex). It’s an open problem of how far you can keep expanding your structure this way (possibly infinitely far, if you allow the surface to cross itself). Which is strange, because with 3, 4 or 5 triangles around a vertex you get a platonic solid, so you definitely can’t go on forever. If you put 6 triangles around a vertex, you end up tiling a plane, so you definitely can go on forever.

For 7 or more triangles, it’s this sort of saddle shape and we don’t know if we can go on forever. How far can you go even if you do it physically? Physically you’ll definitely end up not going on forever, but still interesting to see how far you can go.

Biology, Coding, Experiments, JavaScript, Milestones, Simon teaching, Simon's Own Code, Simon's sketch book

Evolving Creatures in p5.js

Simon’s latest independent coding project involved some biology lessons! He loves the channel Primer by Justin Helps and watched his evolution series many times, studying the rules for species’ survival and multiplication. This resulted in two interactive evolution simulations, in both of which Simon recreated the rules he learned. The first simulation doesn’t involve natural selection and is based on these two videos: Simulating Competition and Logistic Growth and Mutations and the First Replicators.

Full Screen interactive version:


Simon added natural selection in Part 2, based on Primer’s video Simulating Natural Selection (the code Simon wrote from scratch):

Full Screen interactive version:


Coding, JavaScript, Notes on everyday life, Simon makes gamez, Simon's Own Code, Together with sis

Tic-Tac-Tic-Tac-Toe-Toe in p5.js

Simon has programmed this game of Tic-Tac-Tic-Tac-Toe-Toe Game in p5.js from scratch. He and his sister have had hours of fun playing it (and she turned out to be better at this strategic game):

Play Simon’s game online at:


Crafty, Geometry Joys, Math Riddles, Math Tricks, motor skills, Murderous Maths, Simon teaching, Simon's sketch book

Alternating series, a crafty solution.

What does this infinite sun converge to?
Cut the four L-shapes out…
Divide the central L-shape in four L-shapes and cut those out, too…
You can go on forever…
but it’s already clear at this step, that the sum converges to 2/3 (two of the three squares the original L-shape was made up of)

Simon learned this from an alternating series visualization by Think Twice.

Crafty, Geometry Joys, Math and Computer Science Everywhere, Math Tricks, Murderous Maths, Simon teaching, Simon's sketch book

Area of a dodecagon without trigonometry

How do you find out the area of this dodecagon without using trig?
Rearrange the triangles to make…
Three squares! The area of the dodecagon with a radius r is equal to the area of three r-sided squares or 3r^2.
The formulas for other polygons. There seem to be no formulas for the heptagon, nonagon and hendecagon (without using trigonometry that is). Simon’s notes above also say that no polygon can possibly have an area equal to or larger than πr^2 (because that’s the area of a circle). A square is 2r^2, a dodecagon is 3r^2, and so no polygon is 4r^2.

Simon learned this from a visual mathematics video by Think Twice.

Experiments, Murderous Maths, Notes on everyday life, Simon makes gamez, Simon teaching

2048 Cookies

We devoted the beginning of January to a goofy stop-motion project: Simon and I baked 2048 cookies! No, we didn’t bake over two thousand cookies! We only baked and decorated a little over a hundred of them, Simon had calculated that that would be enough to play the 2048 game… with cookies. Simon came up with all the editing tricks to make this project work. In the video, he also explains his winning strategy and confesses he has made another attempt to program the game, without me knowing it. Apparently, that’s how he first came up with the idea to bake the cookies, by looking up pictures of 2048 while programming and stumbling upon this blog.

Here is a link to Simon’s previous attempt to program 2048, about a year ago (he got pretty far).

Simon calculated how many cookies we needed and came up with a colour scheme
Logic, Machine Learning, Milestones, Murderous Maths, Notes on everyday life, Set the beautiful mind free, Simon's sketch book

Learning to See. On Machine Learning and learning in general.

December was all about computer science and machine learning. Simon endlessly watched Welch Labs fantastic but freakishly challenging series Learning to See and even showed me all the 15 episodes, patiently explaining every concept as we went along (like underfitting and overfitting, recall, precision and accuracy, bias and variance). Below is the table of contents he made of the series:

While watching the series, he also calculated the solutions to some of the problems that Welch Labs presented, like the question about the number of possible rules (= grains of sand) for a simple ML problem if memorisation is applied. His answer was that the grains of sand would cover all land on earth:

Simon loved the historical/philosophical part of the course, too. Especially the juxtaposition of memorising vs. learning, the importance of learning to make assumptions, futility of bias-free learning, and the beautiful quotes from Richard Feynman!

screenshot from Welch Labs Learning to See [Part 5: To Learn is to Generalize]

I have since then found another Feynman quote that fits Simon’s learning style perfectly (and I believe is the recipe to anyone’s successful learning as opposed to teaching to the test): “Study hard what interests you the most in the most undisciplined, irreverent and original manner possible.” We have discussed the possibilities of continuing at the university again. I have also asked Simon how he sees himself applying his knowledge down the road, trying to understand what academic or career goals he may have set for himself, if any. Does he have a picture of himself in five years from now, where does he want to be by then? He got very upset, just like when asked to sum himself up in one sentence for an interview last spring. “Mom, I’m just having fun!”

A beautiful humbling lesson for me.