[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.5.2 Noise and Random

type noise ( float x )

type noise ( float x, y )
type noise ( point Pt )
type noise ( point Pt; float w )
1D, 2D, 3D and 4D noise function. type can be float, color, point or vector.

type pnoise ( float x, period )
type pnoise ( float x, y, xperiod, yperiod )
type pnoise ( point Pt, Ptperiod )
type pnoise ( point Pt; float w; point Ptperiod; float wperiod )
Same as noise but has periodicity period. Maximum period is 256.

type cellnoise ( float x )
type cellnoise ( float x, y )
type cellnoise ( point Pt )
type cellnoise ( point Pt, float w )
Cellular noise functions (1D, 2D, 3D and 4D).

type random ( )
Returns a random float, color or point. Returned range is [0..1]. Can return uniform or varying values. Here is a trick to put a random color in each grid of micro-polygons:
 
uniform color red = random();
uniform color green = random();
uniform color blue = random();

Ci = color( red, green, blue );



This document was generated by Aghiles Kheffache on July, 31 2003 using texi2html
3Delight 1.0.0. Copyright 2000-2003 The 3Delight Team. All Rights Reserved.