SS.1.02 Processing Week 02

Since I missed James’s workshop this week, he sent me the annotated code that they had produced in the session.

The first sketch was an ellipse and a rectangle which changed size depending on which keys were pressed. Something I couldn’t understand however was why, when I pressed the ‘q’ ‘u’ and ‘e’ keys to change the size of the shapes, all previously drawn shapes would dissappear. I looked through the code for a line that might suggest, deletion of the old shape. But couldn’t find one. This didn’t make sense to me because in the code we wrote last week, the ellispes drawn by the mouse click stayed on the screen as new ones were drawn. It seems like this is just the nature of the programming language, or maybe that the mouse click is an essential factor here.

Comparing the code for both sketches. Why do the shapes seem to ‘despawn’ in colour_scroll but not in sketch_161108_002

I think the main difference here might be that in last week’s sketch an ellipse is only drawn when the mouse is pressed but in the color_scroll, the shapes are drawn and then those same shapes change depending on the parameters set by the rest of the code.


I studied the code of colour_scroll and proceeded to write my own, instead of copying it word for word from the version that was given to me, I opened last week’s sketch to help me through the syntax. My end result was as follows:





Author: Pip Williamson

Pip // Animator & Motion Designer

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s