Processing – Week 7

After we came back from the Easter holidays we continued learning about processing called local & global variable and IF Statements.

Local & Global variable 

Screen Shot 2015-04-17 at 12.09.22

This is code of local & global variable in processing

Screen Shot 2015-04-17 at 12.09.54 Screen Shot 2015-04-17 at 12.39.01 Screen Shot 2015-04-17 at 12.39.19 Screen Shot 2015-04-17 at 12.39.41 Screen Shot 2015-04-17 at 12.39.54

The image changes different colours when you click the play button in processing.

IF Statements

Screen Shot 2015-04-17 at 17.01.54

This is code of IF Statement in processing to show the square  changing colour from red into green by mouse X and Y.

 

Screen Shot 2015-04-17 at 17.03.29 Screen Shot 2015-04-17 at 17.03.50

 

This is how the image looks when it changes colour from red to green.

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