Procedural Geometry

Procedural is an adjective applying to curves and surfaces which are defined implicitly by geometric requirements. A curve or surface is not procedural if it is defined by an explicit formula: for example, B-spline curves and surfaces, straight lines, circles, spheres, and planes are not procedural. Procedural curves and surfaces may arise when modeling operations are performed on other geometric elements: for example, when two surfaces are intersected or a curve is offset.

Defining Things Without Formulas

Counting whole numbers and subdividing things allows people to conceptualize most numbers easily. But some numbers, like the square root of two, cannot be obtained this way. The question is: how do you define it then? One way to define the square root of two would be as the length of a diagonal of a square with side length one. This definition is superior to its approximations: 1.4, 1.41, 1.414 ... because the procedural definition can be used to make arbitrarily accurate approximations, while individual approximations each have a fixed inaccuracy to them.

Some Parametric Geometry

The simplest parametric surfaces and curves to represent and operate upon are those which have explicit formulas. For example, some simple formulas and what they describe are listed below.

 Circle $r(t)=(\cos{t}, \sin{t}, 0)\,$ Helix $r(t)=(\cos{t}, \sin{t}, t)\,$ Wiggle $S(u,v)=(u, v, \cos{u} \sin{v} )\,$ Cone $S(u,v)=(u, v, \sqrt{u^2+v^2})\,$

Where Procedural Geometry Arises

A problem results from simple operations like

• intersecting surfaces
• offsetting surfaces
• blending edges
• sweeping edges

which quickly go out of the realm of geometry that can be described by an explicit parametric formula. For example, we cannot find a parametric formula for the curve obtained by intersecting the wiggle and cone described in the previous section, because

$cos(u)sin(v)=\sqrt{u^2+v^2}$

does not have a closed form solution. However, numerically stable methods exist for finding intersections between surfaces: so we can define curves like the one above as intersections between two surfaces, and evaluate them by calculating points where the surfaces intersect. You could approximate this curve by a NURBS curve, but this limits the precision that you are dealing with. If multiple operations are performed on an approximation like this, replacing procedural geometry with approximate NURBS geometry at each step, "round off" errors would build up. In contrast, if this curve is defined as an intersection of two surfaces, we can perform whatever subsequent operations we want, without introducing this source of inaccuracy.

Procedural Curves

All procedural curves are intcurves, but not all intcurves are procedural. The type of int_cur underlying the intcurve determines whether it is procedural or not. If the underlying int_cur is an exact_int_cur, then the curve is a B-spline and it is not procedural. All other classes of int_curs are procedural. To show the versatility of procedural curves, some of the more commonly used procedural int_cur classes are listed in the table below.

Note: Applications should use the curve and intcurve interfaces, rather than the int_cur interface.

int_cur class Description
par_int_cur The 3-dimensional image of a parameter space curve
int_int_cur The intersection of two surfaces
law_int_cur A curve defined by a user-defined function
off_int_cur The intersection of two surfaces offset from two given surfaces
offset_int_cur The offset of another curve
off_surf_int_cur The offset of a curve lying on a surface along the surface normal
para_silh_int_cur A parallel-view silhouette curve
persp_silh_int_cur A perspective-view silhouette curve
proj_int_cur The perpendicular projection of a curve onto a surface
spring_int_cur A spring curve, which is a curve along the edge of a blend surface

Procedural Surfaces

All procedural surfaces are splines, but not all splines are procedural. The type of spl_sur underlying the spline determines whether it is procedural or not. If the underlying spl_sur is an exact_spl_sur, then the surface is a B-spline and it is not procedural. All other classes of spl_surs are procedural. To show the versatility of procedural surfaces, some of the most frequently used procedural spl_sur classes are listed in the table below.

Note: Applications should use the surface and spline interfaces, rather than the spl_sur interface.

spl_sur class Description
blend_spl_sur A blend surface
ruled_spl_sur A ruled surface
sum_spl_sur A sum surface
law_spl_sur A surface defined by a user-defined function
off_spl_sur The offset of another surface
rot_spl_sur A surface of revolution
skin_spl_sur A skinned surface
loft_spl_sur A lofted surface
net_spl_sur A net surface
sweep_spl_sur A swept surface