Solar System in Processing Coding Challenge

Simon returned to the Solar System in Processing Coding Challenge by Daniel Shiffman – something he tried before and got stuck. He has now successfully completed both the 2D and the 3D parts:

 

 

 

 

 

Advertisements

MotorAttractor with Box2D in Processing (Java)

In this project Simon combined two exercises and one example from Daniel Shiffman’s Nature of Code book, Chapter 5 – Physic Libraries. The specific physics library used here is Box2D. Simon combined exercises 5.6 (Bridge) and 5.10 (Attraction Apply Force), and example 5.7 (Create a windmill) to create a motor that catapults particles towards an attractor. If the particles fly past the attractor, “bricks” can be added to the canvas by clicking the mouse – the weight of the bricks helps regulate the motor in the right direction. For this project, both gravitational attraction and global gravity force were applied:

 

 

 

Simulating Evolution: Evolutionary Steering Behaviors

 

On Wednesday Simon went on with playing god (evolution simulation) and translated Daniel Shiffman’s Evolutionary Steering Behaviors Coding Challenge from JavaScript to Java.  The goal of the challenge is to create a system where autonomous steering agents (smart rockets) evolve the behavior of eating food (green dots) and avoiding poison (red dots).

This challenge is part of the spring 2017 “Intelligence and Learning” course at NYU’s Tisch School of the Arts Interactive Telecommunications Program. Simon was especially happy to find out that Daniel Shiffman left a couple of personal comments praising Simon’s progress and offering help in pushing his code to Danniel’s GitHub repo.

Here is Simon’s translation on GitHub: https://github.com/simon-tiger/steering-behaviors-evolution

The rockets have their own DNA consisting of four genes:

IMG_4531

The challenge step by step:

 

 

 

 

 

Asteroids Coding Challenge

Simon has built this fun Atari game where a spaceship shoots at asteroids with laser and breaks them down into pieces. It was actually another coding challenge by Daniel Shiffman that Simon had tried a couple months ago when he was just beginning to write code. Back then he got seriously stuck at the asteroids phase (using JavaScript and HTML5 canvas with the p5.js library to program the “laser” functionality and examine collision detection with the asteroids). This time around, however, he glided through the challenge, nearly effortlessly, in his own words. He did enjoy it immensely and even tried rebuilding it on the RaspberryPi, but had “a copy-paste issue”.

The code in online in the p5.js web editor. You can run it and play the game, you can also hit the Download button and play on a big screen!

http://alpha.editor.p5js.org/simontiger/sketches/r16tcHq3e

 

 

Astronomy Classes

On Saturday Simon had his second astronomy workshop at the local observatory. The pages below is “homework”. He wasn’t particularly enthusiastic doing it but found tasks 4, 5 and 8 intriguing and was proud of himself when everything was completed. I always struggle with myself when giving him such “compulsory” tasks as he works better autonomously or at least when being able to chose the problems (which is often possible when using an online math platform, for example).

He also doesn’t like writing things down for someone else, in other words when he doesn’t see any practical value in it for the future. I’ve noticed that he prefers writing things down for himself to remember. Sometimes he even gets up at night to write something down, it’s quite funny to watch.

He said he liked his second workshop but couldn’t answer the question whether he learned anything new. He literally said “I can’t say yes or no to this question”. The workshop was about stars and galaxies. The first workshop was about constellations. Simon also confided to me that he is a little bit afraid of the third workshop next month: it’s called “3, 2, 1 Go!”. He is old enough to understand they would definitely not be taking an actual space flight during the workshop, still it seems to be triggering the old fears he’s always had of (accidentally) stepping in an aircraft and taking off.

img_2530

img_2531

img_2532

img_2533

Bigger than Saturn

image

image

Tonight a little miracle happened. We have finally managed to see Saturn! And Mars! All thanks to a very special man, Robert Matheus of the Antwerp observatory Urania. Robert has only met us twice, I don’t even think he remembers our names. He felt sorry for Simon that he didn’t manage to see Saturn at the last viewing night at the observatory (it was too cloudy), so he asked for our e-mail and said he would personally notify us once Saturn could be seen again. Because if we wait until another public viewing night next month it will be too late, Saturn won’t be easy to observe until 2023. And tonight Robert biked to central Antwerp  for almost one hour, with a large telescope, in the darkness, for free. He didn’t even want to have the bottle of wine I brought him as a thank-you token. He spent nearly  two hours with us on the roof of the MAS tower, then dismantled his telescope and biked back home for another hour. Saturn was beautiful. But it was even more beautiful to have seen that this planet, predominately inhabited by humans who think of Simon as too much extra work, is also inhabited by this other rare human species. The telescope survived, too!

image