The Nature of Code – Physics / Animation final

We start with one star made in photoshop with the feather tool:

I wrote the sketch in processing. There is a class for the stars, which loads the star image above 500 times at random places on the canvas, of random sizes and random brightness’s for every draw loop. The stars are attracted to 500 invisible black holes. The attraction physics are based on the forces chapter in The Nature of Code. If you move the mouse to the left in the sketch, you can “disappear” the stars one at a time.

Huge thank you to fellow ITP student Aarón Montoya-Moraga for trying his best to teach me calculus for force vectors. Yikes!

We decided it would be fun to project the star field onto the ceiling in my apartment with two projectors.


Here is the projects code on github!


Leave a Reply

Your email address will not be published. Required fields are marked *