Methods


Generalised Cylinders

Generalised cylinders were initially developed for solving the problem of modelling curved three-dimensional objects [McCormack,2004]. Generalised cylinders have been frequently been used for modelling natural objects and organs [Prusinkiewicz, Mech and Hanan,2004; Bloomenthal,1985].

The basic idea of a generalised cylinder is defining series of two dimensional cross section outlines, which then are swept along a three dimensional curve [Bronsvoort, de Voogt and van der Helm,2000].

To define the position and orientation of the cross section along the axis, the Frenet reference frame is used [Bronsvoort, de Voogt and van der Helm,2000]. The Frenet reference frame is an local coordinate system which consists of the tangent vector of the axis, the normal vector that points to the centre of the curvature, and the binormal vector as a cross product of tangent and normal vectors. The advantage of Frenet reference frame is that it can be calculated anywhere along the curve, independently from the curve's parametrisation.

Turtle Geometry

Prusinkiewicz, Mech and Hanan [1997] used turtle programming to extend modelling the tree branches using generalised cylinders. The turtle is defined as three orthogonal unit vectors, representing its position and current heading. This ortogonal correspond to the Frenet reference frame.

A set of turtle commands [McCormack,2004; Prusinkiewicz and Lindenmayer,1990] can be applied to the turtle to control the turtle’s movements:

To gain more control, the commands can be parameterised for accepting quantities.

During the generalised cylinders creation, a string of turtle commands will be parsed and associated methods will be called for changing position of the turtle state or drawing part of the generalised cylinders.