Fluxus

# Noise and Randomness

Noise and randomness is used in computer animation in order to add “dirt” to your work. This is very important, as the computer is clean and boring by default.

### Randomness

Scheme has it's own built in set of random operations, but Fluxus comes with a set of it's own to make life a bit easier for you.

### Random number operations

These basic random commands return numbers:

```(rndf) ; returns a number between 0 and 1
(crndf) ; (centred) returns a number between -1 and 1
(grndf) ; returns a Gaussian random number centred on 0 with a variance of 1
```

### Random vector operations

More often than not, when writing fluxus scripts you are interested in getting random vectors, in order to perturb or generate random positions in space, directions to move in, or colours.

```(rndvec) ; returns a vector where the elements are between 0 and 1
(crndvec) ; returns a vector where the elements are between -1 and 1
(srndvec) ; returns a vector represented by a point inside a sphere of radius 1
(hsrndvec) ; a vector represented by a point on the surface of a sphere radius 1, hollow sphere
(grndvec) ; a Gaussian position centred on 0,0,0 with variance of 1
```

These are much better described by a picture:

todo