This week I got caught up with the oscillator exercises and explored particle systems. This sketch (link here) is based off of the very straightforward particle system inheritance / polymorphism example from Nature of Code. As an exercise, I added a new inherited class, the “star” class. I also used a super constructor in that class, and was able to adjust the parameters a little bit of the stars by changing their direction, rotation and speed, while still being a child class of the original particle system.
Also here is the code for my “start and stop” buttons if anyone finds it useful. I wrote them as a standalone function. The reason for the start and stop buttons is really just for web site performance. In ICM it wasn’t such a big deal letting all my sketches just run on a web page, but once you introduce particle systems it starts getting pretty performance intensive.
In this sketch (link here), I was just playing with the parameters of the exploding firework example, tweaking some of the physics to explore how the particle system works.
Here is a link to the above sketch. I was a little behind on assignments so I also went back and played with the oscillator exercises and Fourier transform series. I have to say that my mind was truly blown when I learned how the fourier transform works. Pretty wicked stuff. Watch this video if you feel like having your mind blown.
This sketch is another play on creating square waves from a Fourier Transform series. Link to sketch here