|How it works|
Generating the density function
The first step to defining the density function f=f(x,y,z) is prescribing the base or primary shape. The primary shape determines the initial values of all points in the voxel volume. A typical primary shape is the plane, where for a plane normal to the y-axis the density function f = -y. The selection of the iso-value determines where the unmodified primary mesh would be generated. Density values less than this iso-value designate above a solid surface whereas values greater than this iso-value imply inside a solid.
Other primary shapes include:
Volumetric modifiers are functions that are applied by the user to alter density field values. Modifiers can affect the entire volume or just user-defined regions. A region is itself a volumetric modifier that nests modifiers specific to a user constrained volume. Modifiers are classed into three categories:
Once the values of the density volume are known an iso-surface is extracted using Marching Cubes. Marching Cubes is an algorithm for extracting a polynomial of an iso-surface from a three-dimensional scalar field. Essentially taking the values from the eight corners of a cube (the voxel) the algorithm determines the polygons necessary to represent the iso-surface passing through the cube.