Intro to Computational Media 10/4/22

Major Tom

Link to week 5 homework in the p5 web editor.

My Pcomp midterm and other tasks got the better of me this week. Initially, I wanted to make this ICM homework submission a much more ambitious do-over of the first p5 sketch I turned in. What I ended up with is code that’s nicer and more versatile than what came before it, but only by so much.

The approach I took was pretty straightforward: take the triptych of Lego astronauts I made, make the astronaut drawing code into a function, then begin thinking of ways to further compartmentalize and fine tune how they’re drawn to the screen with the use of another function.

I only got as far as modifying the astronaut positions along the X-axis. It should be trivial to expand upon this by adding in Y-axis control and scaling, but because I wrote the original code with a specific canvas size in mind it would take some careful tweaking.

I can also see a path to making this sketch more interactive, say by rigging it such that with a mouse click an astronaut is drawn on where the user clicks the canvas by passing in the mouseX and mouseY positions to the function. I’d like to do this, and I hopefully will, but I figure it’s better to accept that this week’s submission is a little unambitious than stress myself out by scrambling to hack something together quickly. It’s all part of the learning process, I think.–10/18/22