Simon turned 8!

For his 8th birthday, Simon made a present for himself in Node.js and spoke about his new year’s resolutions that mainly involve live streaming:

Today, two days later, we actually managed to test stream! Both of us had no idea how live streams work and thought we would have to install expensive encoders to enable streaming. It turned out to be much easier than we expected, although it took us a couple of hours (and tears on Simon’s behalf) to figure it out. So there will be live streams coming shortly! By the way, if you haven’t done so yet, please subscribe to Simon’s YouTube channel (well it’s actually my channel, but it’s about Simon). When he has over 100 subscribers, he can stream from mobile devices which would be handy.

DSC_1186 - kopie

DSC_1218 - kopie

DSC_1235 - kopie

DSC_1243 - kopie

Simon says he had a bad birthday this year, but here were a few things he did like and above all, a new Murderous Math book, “Shapes and Sizes” (he is holding it on the photo above).

Time to change the tags to “8 year old programmer”!

Flocking System Painting with Pixels

Flocking painting Live Video 8 Aug 2017

This is one Simon’s most beautiful projects recently! Simon saw the idea to link the webcam image to the boids of a flocking system in a video by Daniel Shiffman, but the code featured in this project Simon wrote himself. The Flocking code is based on Daniel Shiffman’s example from his book The Nature of Code. (Flocking is a steering behavior that consists of separation, alignment and cohesion – which are also steering behaviors – combined).

Simon’s sis also posed for the camera:

Flocking painting Live Video 8 Aug 2017 2

Simon is also about to make a JavaScript version of this fun project, because JavaScript allows to host it easily online, so that everyone can play with it. With JavaScript, he may even be able to write it in an online editor, so there won’t even be a need to host it. Check in later for an update to this post!

UPDATE: Simon encountered a problem trying to translate his Flocking System Painting with Pixels into JavaScript: P5 runs much slower than Processing after Simon added steering behavior. He doesn’t know how to solve this. Simon’s JavaScript code is online at https://codepen.io/simontiger/pen/ZJKBbN?editors=0011

Sound Wave Maths in Processing

Simon has created animations visualizing sound waves (Triangle, Sawtooth, Square and Sine waves) in Processing (Java), using wave functions.

These are the functions he used for the Sawtooth, Square and Sine waves:

DSC_1131

DSC_1132

Not to confuse “sine” with “sgn” (sgn standing for sign):

DSC_1134

He was inspired by the logarithmic and power functions that he was studying during his math class yesterday. Simon was trying to draw both types of functions in Grapher on his laptop, but only succeeded for the power functions (because there were no subscript option for the logarithms).

Circle Intersection with Perlin Noise in Processing (Interactive)

Simon built a beautiful interactive circle intersection program in Processing, in which the circles detect intersection and change colors (according to Perlin Noise) once it occurs. The player can control the number of circles by adding and removing them in two modes (mouth clicked and mouth dragged). Simon added a button to switch between the two modes. (Loosely based upon Daniel Shiffman’s tutorials on checking object intersection).

 

 

Automatic Magformers Table

Magformers (magnetic building sets involving maths) used to be Simon’s greatest passion when he was six (just a year ago!) and this week he has been travelling in time to revisit this old love, after his little sis received a new Magformers set as a present. What Simon did next was to combine Magformers and programming: he created an automatic table listing various Magformers models (in HTML/ JavaScript). The sets that can be used to build those models were to get filled in automatically, depending on the number of specific shapes needed for every model and the number of such shapes available in every set. As you might imagine, this involved many lines of code and a whole lot of computational thinking. At one point, when Simon was nearly done, he realized that the column listing the sets wouldn’t get filled in properly. He had a bug in his program that he couldn’t find, so he turned to his older friends in Slack for help. It’s such a pleasure to see him communicate with these experienced programmers on a regular basis now and unbelievable how eager and resourceful they are. One of Simon’s friends from Slack even created his own version of Simon’s program in CodePen! What makes it even more wonderful is that Simon no longer hesitates to apply the good advice he gets. The next day he wrote some “helper functions” and the table worked!

Simon hasn’t put this project online yet, as he wanted to make it more interactive and hasn’t managed to do that so far.

 

 

 

 

 

 

Maze Generator Game in Processing

Simon has turned Daniel Shiffman’s Maze Generator Coding Challenge (generating a maze using the Depth-First Search Recursive algorithm) into a game in Processing (Java). It’s not fully operative yet, as the player can partially walk through walls, but Simon did get quite far and even received positive comments from Daniel Shiffman.

Simon’s own little neural network

Connected Perceptrons in Processing 26 Jul 2017

This is one of Simon’s most enchanting and challenging projects so far: working on his own little AIs. As I’ve mentioned before, when it comes to discussing AI, Simon is both mesmerized and frightened.  He watches Daniel Shiffman’s neural networks tutorials twenty times in a row and practices his understanding of the mathematical concepts   underlying the code (linear regression and gradient descent) for hours. Last week, Simon built a perceptron of his own. It was based on Daniel Shiffman’s code, but Simon added his own colors and physics, and played around with the numbers and the bias. You can see Simon working on this project step by step in the six videos below.

His original plan was to build two neural networks that would be connected to each other and communicate, he has only built one perceptron so far.

 

 

 

 

 

 

Hero Game in Processing. Simon’s Own Code.

Hero Game 24 Jul 2017 High Score

Simon has created a great new game in Processing: The Hero Game! It is somewhat like the good old Mario, except that Simon has no idea what Mario is and came up with the concept himself. The game is based upon Circle-Rectangle Intersection, something that he was studying for the past several days. It was impressive to see how quickly he wrote the program for the game, I think it took him something like an hour, while waiting for dinner. The game has a hero (Simon), represented by the yellow circle, obstacles (from below and above) and money that the hero collects to get points. The game stops once the hero hits an obstacle. Simon is planning to add extra random obstacles and maybe also create a winning score threshold (around 50 or 65, he says). His own highest score so far has been 35.

Below are the making-of videos, step by step:

 

 

 

 

 

Update: Simon added trees!

Hero Game 24 Jul 2017 Tree 2