Posted February 11, 2025 by rafi.pdf
One week into a programming class and the training wheels are coming off! After last class's warm-ups with LOGO, a language designed with sixth-graders in mind, we have graduated to the very adult JavaScript library p5.js. It's taking some getting used to, but a semester of learning Processing-style Java last year has proven immensely helpful - plus, it's nice to not have to write your code perfectly before you run it. Most of our focus is on generating visuals, starting with the most basic functions of creating a canvas, drawing shapes, and making pictures change with if statements and for loops. Even with just these tools, the possibilities are endless!
Step 1 of the p5 journey was making a black rectangle appear on different sides of our canvas.
Basic, but we have to start somewhere.
All the final program was missing was a ball to do the walking. And a trail marker a different thickness than the ball.
And we've done it! No flashy designs, no text or walls to bump into or colorful floating iceberg, just hours of messing with arrays and percentages. I'll see if I can't stick a smiley face or a picture of an ice cube on the end of it to top it off.
This Perlin noise stuff is cool! I don't totally understand (at all in any capacity) how adding more dimensions to the noise() function works, but this whole exercise seems like a good, if time-consuming, starting point. Looking forward to using it again maybe eventually!
-Rafi