To estimate the number of segments to be used to discretize a curve a binary tree is built in the parametric space of that curve. This tree structure is used to evaluate the mass curve by integrating the required element density (Fig. 1). The number of segments can be expressed as

where is the element density along the curve, is the centerline
parameterized by in range from to and
brackets stand for integer part of the enclosed quantity. The
actual discretization of the curve is then obtained by splitting the
mass curve to pieces which are projected back to the model curve
(Fig. 1). Since the octree is employed for the mesh
size control a gradual and very smooth discretization is achieved
which does not need further optimization.

*Daniel Rypl
2005-12-03*