Previous:Dents Main Index Next:Granite

#### Gradient

One of the simplest patterns is the `gradient` pattern. It is specified as

`

  pigment {gradient

` <Orientation> [PIGMENT_MODIFIERS...] `}`

where <Orientation> is a vector pointing in the direction that the colors blend. For example

       pigment { gradient x } // bands of color vary as you move

                              // along the "x" direction.

produces a series of smooth bands of color that look like layers of colors next to each other. Points at x=0 are the first color in the color map. As the x location increases it smoothly turns to the last color at x=1. Then it starts over with the first again and gradually turns into the last color at x=2. The pattern reverses for negative values of x. Using `gradient y` or `gradient z` makes the colors blend along the y- or z-axis. Any vector may be used but x, y and z are most common.

As a normal pattern, gradient generates a saw-tooth or ramped wave appearance. The syntax is

`

  normal {gradient

` <Orientation> [`,` Bump_Size] [NORMAL_MODIFIERS...] `}`

where the vector <Orientation> is a required parameter but the float Bump_Size which follows is optional. Note that the comma is required especially if Bump_Size is negative.

Previous:Dents Main Index Next:Granite