7.2.2 Density

From [pov:6.8.3]:
Particles of media are normally distributed in constant density throughout the media. However the density statement allows you to vary the density across space using any of POV-Ray's pattern functions such as those used in textures. If no density statement is given then the density remains a constant value of 1.0 throughout the media. More than one density may be specified per media statement. The syntax for density is:

DENSITY:
    density
    {
        [DENSITY_IDENTIFIER]
        [DENSITY_TYPE]
        [DENSITY_MODIFIER...]
    }
DENSITY_TYPE:
    PATTERN_TYPE | COLOR 
DENSITY_MODIFIER:
    PATTERN_MODIFIER | DENSITY_LIST 
    | color_map { COLOR_MAP_BODY } 
    | colour_map { COLOR_MAP_BODY } 
    | density_map { DENSITY_MAP_BODY }
The density statement may begin with an optional density identifier. All subsequent values modify the defaults or the values in the identifier. The next item is a pattern type. This is any one of POV-Ray's pattern functions such as bozo, wood, gradient, waves, etc. Of particular usefulness are the spherical, planar, cylindrical, and boxed patterns which were previously available only for use with our discontinued halo feature. All patterns return a value from 0.0 to 1.0. This value is interpreted as the density of the media at that particular point. See "Patterns" for details on particular pattern types. Although a solid COLOR pattern is legal, in general it is used only when the density statement is inside a density_map.

Andreas Kriegl 2003-07-23