Simon’s got a new collab going and possibly what is a beginning of a real friendship with a peer from Bangalore, India. They have already finished several wonderful projects together that have been merged on The Coding Train GitHub:
You can turn the card around by using the mouse if you open it in p5.js:
Simon made this card during Daniel Shiffman’s Processing Telethon last night, joining other programmers and supporting the Processing Foundation.
We also had some great nerdy fun watching Matt Parker’s new Xmas video about turning your tree into a hologram and applying math to create vfx art with xmas lights! Might try this next year!
Tomorrow we are celebrating Sinterklaas, or St.Nicolas’ birthday. It’s the climax of the traditional Dutch gift-giving season embracing the last two weeks of November and the first week of December. During this period, kids sing century-old songs (lately replaced by their less racist versions) and get to place their shoes (or in our case, roller-skates) in front of the fireplace every few nights before bedtime to find them filled with small presents and seasonal goodies (like spicy ginger cookies and special chocolates) in the morning. The legend goes that while the children are asleep, St.Nicolas and his gang of sooty-faced pages drop by to slide the gifts in their shoes, but Simon and Neva are old enough to have realized it’s just me. The magic isn’t gone though. On the contrary, I don’t think I’ve ever seen them this preoccupied with St.Nocolas before and it’s all thanks to the so-called Sinterklaasjournaal, a daily St.Nicolas news show on Dutch tv packed with irony and allusions to current events. Neva has even programmed her first game ever, inspired by the classic games featured on the Sinterklaasjournaal website. She came up with the algorithms all on her own, and Simon helped her a little with writing the actual code. She didn’t want to use any arrays and classes yet, so she wrote spaghetti code instead 🙂
One more project inspired by Sebastian Lague: a Bézier Editor. Simon used Sebastian Lague’s algorithms to recreate the editor in p5.JS.
I added the export button! It’s under the “export” folder. Clicking it will show you a serialized version of your path. It’s just in JSON format, so you can read/use it quite easily.
The Bézier curve is made out of multiple “segments”, also called “cubic curves”. It turns out that if you write down the equation for such cubic curve, you actually get a cubic polynomial. I derived these equations:
I started with the equation of a linear curve, worked up to a quadratic curve and the to a cubic curve. Maybe there’s a mistake in these, because there’re a lot of steps and I was a bit inconsistent. If you watch my previous video about Bézier curves, you’ll see how a cubic curve is derived.
Yes, Simon had already made another video about Bézier curves, see our earlier blog post. It’s funny how back then I had no idea what Bézier curves were, and by now, after I have started studying motion design, béziers have become my daily thing. And I’m learning so much from Simon! This is the power of the homeschooling lifestyle!
Simon has been greatly inspired by Sebastian Lague’s new video on how computers work, it seems to have sparked a whole new wave of enthusiasm about logic gates and logic simulations. Simon has ended up recreating Sebastian Lague’s digital logic simulation, making his own digital circuits editor in p5.js: https://editor.p5js.org/simontiger/present/bqKM00Ejq Simon’s code: https://editor.p5js.org/simontiger/sketches/bqKM00Ejq
I decided to ditch the parsing idea and instead just adapt the code to what I already have. See the result in my Digital Logic Simulation Part 2 video:
I filmed Simon while he was coming up with solutions. He also used some advice from fellow programmers on Twitter:
Simon has created this sound monitor to help him keep track of the sounds around him if he has his headset on. You can hear the surrounding sounds much better via pressing the “Monitor” button and stop listening to your surroundings by pressing “Stop Monitoring”: https://editor.p5js.org/simontiger/sketches/5TIWPuZW6
Simon has had hours of fun with Test Tube Games, a science games portal featuring interactive explanations and dynamic puzzles on Chemistry and Physics. He has created two simulations based on the games he played. The first one is an electromagnetic field simulator:
Press “1” for positive charge, “2” for negative charge, “R” to run. Press “3” and “4” to create magnetic fields/ press “0” to erase them. Press Shift+1 and Shift+2 for “lazy particles”.
Simon’s other TestTubeGames-inspired project is called “Floating Astronaut”:
Haven’t figured out a way to put the astronaut inside the rocket yet though.
One more science game is definitely a hit at our home, “Bond Breaker” (on chemical bonds). At a certain point, it gets so hard you start feeling like a secret agent on a mission.
If you’re interested in why #covid-19 tracing apps are important and the most privacy-friendly way to implement them, please read this interactive essay by Nicky Case and play with the colorful simulations of all our possible futures. For Simon, this has been the entrance into the Nicky Case @ncasenmare universe (first recommended by 3Blue1Brown). Simon has been gulping down the playable essays on human networks and the spread of complex ideas, self-synchronization in nature, the shape of society and several other burning themes (like coming out and anxiety) and watching Nicky Case’s talks, like this one. Nicky is a self-made indie artist, programmer and writer making very edgy, very 21st century multimedia products that are both profound in content and have an engaging/interactive interface. It’s as if reading an informative piece is turned into a game. And that’s exactly what Nicky stands for: learning through play and messing about. Maybe that’s why Simon has embraced his works so eagerly, Nicky has proven to be one of those perfect matches for our self-directed learning style.
Simon has made a remix of Nicky’s Evolution of Trust, an iterated prisoner’s dilemma: https://editor.p5js.org/simontiger/present/oOurTdGWT
Simon’s code: https://editor.p5js.org/simontiger/sketches/oOurTdGWT
Every polygon can be triangulated into exactly n-2 triangles. So you’ve got the triangulation theorem and the totally opposite theorem in the math universe, Girard’s theorem (the formula for the era of a spherical triangle). I’m going to attempt to put these two together to prove Euler’s polyhedral formula (also known as Euler’s characteristic) V – E + F = 2.
A week later Simon and a friend of his from Germany worked together for several hours, writing a program to cut polygons. It’s still unfinished but is already fun to play with: https://editor.p5js.org/simontiger/sketches/YxNUp5rdJ
Simon has recreated the CodingGame.com’s Spring Challenge 2020 PacMan game in p5.js to be able to work on the AI versions after the spring challenge has finished.
Link to Simon’s PacMan Game version featured in the video (playable for two players on the same keyboard): https://editor.p5js.org/simontiger/present/k9PDqMeew
Simon’s code for this version: https://editor.p5js.org/simontiger/sketches/k9PDqMeew
The PacMan is built on top of a Maze Generator, here’s an example of one of Simon’s maze generators and solvers: https://editor.p5js.org/simontiger/sketches/vj75cHYkf
Simon had been taking part in the Spring Challenge 2020 for several days and reached bronze level.
However he quickly realized that the 11 days of the competition felt too cramped for him to try various algorithms and still be able to work on his other projects. So what he did was recreate the whole PacMan game from scratch in p5.js, so that he has an “archived version” of the challenge and can play with new AI versions later.