ISMA303


Randomness

by Haig. Average Reading Time: less than a minute.

It’s arguable that all generative art includes some degree of randomness: without randomness, there can be no unpredictability. Almost all programming languages include a function equivalent to Processing’s random function, but returning a truly random number is an impossibility for a predictable machine. Computer-generated randomness is always pseudo-random, using mathematical formulae, often including a reference to the machine’s internal clock as one of its factors to ensure that no two calculations yield the same results. The formulae behind these functions are an art in themselves, but you need only trust that a returned random value will be good enough to fool us humans.

Using Random is simple. a random function typically returns a value in a range. For example:

random (high range number);

as in:

random(255);

would return an number between 0 and 255 and:

random (30, 300);
will return a number between 30 and 300;

http://processing.org/reference/random_.html

See Random Circles Exercise 

No comments on ‘Randomness’

Leave a Reply