Processing – Conditionals & Variables

We have been exploring the use of nested for loops, conditional statements and rotation. We started by learning the process of creating rotating patterns using shapes, changing the colour mode, and translating the point of axis to change the rotation patterns.

I started by using a nested for loop to create a grey scale, semi opaque grid background. A for loop controls a sequence of repetitions. From this I also discovered how to use integers and floats, as well as about using the colour mode HSB (Hue, Saturation, Brightness). Here you will see we also experimented with the smooth() function, this draws all geometry with smooth (anti-aliased) edges.

Capture Capture2

We then explored the rotate() and translate() functions. Using the translate function we changed the origin (0,0) from the top left of the canvas to the centre by dividing it by 2 (width/2,height/2).  When changing the hue we also make use of the modulo (%) operation.

Capture3 Capture4

 

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s