Code Editor with Webcam

Simon has come up with a code (in Processing) for an editor that includes live Webcam image to help him record coding tutorials. The project is still in progress.

Advertisements

28 times 28

Simon programmed a presentation to explain why 28×28 is not the same as 20×20 + 8×8 geometrically. The code is quite complicated and involves some trigonometry and conditional statements: the grid is divided into different parts every time Simon clicks and depending on how many times he has already clicked. This is typical Simon – coming up with an inherently arduous and complex system to visualise the beauty of the world around him, even of the seemingly trivial things. By the way, the inspiration for the 28×28 grid came from Simon’s favourite math channel, 3Blue1Brown and its latest video on Neural Networks (the grid was used to explain computer vision).

Simon is doing quite a lot of sums in his head nowadays, looks like it’s a new trend. Today, while bathing in the fountain outside, he was calculating how long 1/16th of a minute lasted. And a couple days ago, while waiting for his appointment at the hospital, he calculated how long it would take someone to read a whole page of random numbers, taking an educated guess that one takes 4 seconds to read out one number and remembering Daniel Shiffman mentioned there were 100×5 numbers per page in his book.

Cannon Game in Processing

Simon shows the Cannon game he created in Processing (Java). He says he was inspired by the Stackoverflow forum, where he saw an example of the game and later wrote the code for a similar game himself. I saw him quickly write the code in a matter of perhaps two hours. Simon will post his code on GitHub once he has added a couple extra features.

Processing on RaspberryPi

Simon installed Processing on his RaspberryPi recently (using the terminal, which looked terribly sophisticated and scary as on Linux you’re forced to do everything through the terminal) and started preparing examples that he hoped to show during his own livestreams, but the RaspberryPi seems to have crashed, unable to bear the weight of so many examples…

dsc_19091456268463.jpgdsc_1908267889140.jpg

Simon contributed his own cloud for the Processing Community Day

Schermafbeelding 2017-10-06 om 18.39.37

In the video below, Simon is showing the cloud design he contributed to the community project collecting cloud designs for the Processing Community Day coming up on October 21, 2017. You can play with Simon’s design on the community project webpage created by Coding Train at https://codingtrain.github.io/CommunityClouds/

Simon’s cloud is called “Round Cloud”. Once you open it on the Coding Train Community Clouds page, the cloud changes its shape every time you click on it.

Computer Vision Projects in Java (Processing)

Among other projects during the vacation were also computer vision projects: color sensor, color tracker, motion sensor and motion/ face detection in Java (in Processing), partially Simon’s own code:

 

 

 

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