Previous:Frequency and Phase Main Index Next:Turbulence

#### Waveforms

POV-Ray allows you to apply various wave forms to the pattern function before applying it to a blend map. Blend maps are `color_map`, `pigment_map`, `normal_map`, `slope_map`, `density_map`, and `texture_map`.

Most of the patterns which use a blend map, use the entries in the map in order from 0.0 to 1.0. The effect can most easily be seen when these patterns are used as normal patterns with no maps. Patterns such as `gradient` or `onion` generate a grove or slot that looks like a ramp that drops off sharply. This is called a `ramp_wave` wave type and it is the default wave type for most patterns. However the `wood` and `marble` patterns use the map from 0.0 to 1.0 and then reverses it and runs it from 1.0 to 0.0. The result is a wave form which slopes upwards to a peak, then slopes down again in a `triangle_wave`. In earlier versions of POV-Ray there was no way to change the wave types. You could simulate a triangle wave on a ramp wave pattern by duplicating the map entries in reverse, however there was no way to use a ramp wave on wood or marble.

Now any pattern that takes a map can have the default wave type overridden. For example:

      pigment { wood color_map { MyMap } ramp_wave }

Also available are `sine_wave`, `scallop_wave`, `cubic_wave` and `poly_wave` types. These types are of most use in normal patterns as a type of built-in slope map. The `sine_wave` takes the zig-zag of a ramp wave and turns it into a gentle rolling wave with smooth transitions. The `scallop_wave` uses the absolute value of the sine wave which looks like corduroy when scaled small or like a stack of cylinders when scaled larger. The `cubic_wave` is a gentle cubic curve from 0.0 to 1.0 with zero slope at the start and end. The `poly_wave` is an exponential function. It is followed by an optional float value which specifies exponent. For example `poly_wave 2` starts low and climbs rapidly at the end while `poly_wave 0.5` climbs rapidly at first and levels off at the end. If no float value is specified, the default is 1.0 which produces a linear function identical to `ramp_wave`.

Although any of these wave types can be used for pigments, normals, textures, or density the effect of many of the wave types are not as noticeable on pigments, textures, or density as they are for normals.

Wave type modifiers have no effect on block patterns `checker`, `brick`, and `hexagon` nor do they effect `image_map`, `bump_map` or `material_map`. They also have no effect in normal statements when used with `bumps`, `dents`, `quilted`, `ripples`, `waves`, or `wrinkles` because these normal patterns cannot use `normal_map` or `slope_map`.

Previous:Frequency and Phase Main Index Next:Turbulence