lundi 31 mai 2010

Order and chaos: introducing random

The first lessons were really hard work, getting used to the terminology, all the windows, the scripting language...

This time we study the order of the world and the chaos of art. We will try to find a solution in between.

Start with your own background (big) and have a small image with a transparent background (.png) ready.

Discover the possibility of the so called “for-loop” for making order in the two direction: horizontal and vertical:

in a loop we can repeat things:
see the download: in the first movie we load one banana:
loadImage("banana.png", 100, 100);

in the second movie we load three banana's:
loadImage("banana.png", 100, 100);
loadImage("banana.png", 130, 100);
loadImage("banana.png", 160, 100);

but what about 25? Do we have to type all 25 banana's?

No!

We can do this more effecient:
we use a counter, just a variable counting from 0 to 25!
and we use this counter also to change the coordinates, in this case the x: 30 + counter*40
for (var counter = 0 ; counter < counter ="counter" j =" 1" j =" j" i =" 1" i =" i" style="text-align: center;">



Now we introduce a bit of disorder, using a random function:

for (var j = 1 ; j < j =" j" i =" 1" i =" i" style="text-align: center;">



We used the Math.random() to get a random number between 0 and 1 and have to multiply this to get between say 0 and 25 by 25...

We get this image....


We get a mixture of order and chaos, and we can send the screenshots to Boijmans.

Follow the sequence of order and chaos in these free flash movies, made especially for YOU!

http://www.contrechoc.com/flash/flash-orderAndChaos.zip

try making a function which can read another image, so you can alternate the order of two images! (We did that in class :-))

try varying the scale of the image, to get bigger and smaller images (We did that in class!)

So here are some static results: when you see it happen on screen, or when you repeat the key stroke on your keyboard every time a new unexpected configuration is made by your flash movie.

this is a random grocery shop from Rabia

this is criticizing commercial religions from Nieke

this is font fun from Giulia



Aucun commentaire:

Enregistrer un commentaire