describing subdivision schemes with lindenmayer systems · 2 lindenmayer systems lindenmayer...

31
Describing subdivision schemes with Lindenmayer systems Pieter J. Barendrecht Multiscale Engineering Fluid Dynamics Department of Mechanical Engineering Eindhoven University of Technology December 8, 2012 Supervisor dr. ir. Clemens V. Verhoosel

Upload: others

Post on 19-Aug-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

Describing subdivision schemes with

Lindenmayer systems

Pieter J. BarendrechtMultiscale Engineering Fluid DynamicsDepartment of Mechanical Engineering

Eindhoven University of TechnologyDecember 8, 2012

Supervisordr. ir. Clemens V. Verhoosel

Page 2: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

Abstract

The continuous study related to subdivision schemes for curves, surfaces andsolids borders on many interesting disciplines. One of these areas is the conceptof Lindenmayer systems, which appears to be a well suited method to describesubdivision schemes. Unfortunately, only a few papers combining these twotopics have been published.

In this report we attempt to provide a clear overview of the papers discussingthe conjunction of the two fields. Additionally, we provide some examples toelucidate and distinguish the different approaches.

i

Page 3: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

Table of Contents

Abstract i

1 Introduction 1

2 Lindenmayer systems 22.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2.1.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2 Graphical interpretation . . . . . . . . . . . . . . . . . . . . . . . 2

2.2.1 Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2.2 Brackets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2.3 Euler cycles . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2.4 Other extensions . . . . . . . . . . . . . . . . . . . . . . . 5

3 B-splines and knot insertion 63.1 B-splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.1.1 The Cox-de Boor relation . . . . . . . . . . . . . . . . . . 73.1.2 Blossoming . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.2 Knot-insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.2.1 Boehm’s algorithm . . . . . . . . . . . . . . . . . . . . . . 103.2.2 The Oslo algorithm . . . . . . . . . . . . . . . . . . . . . . 103.2.3 The Lane-Riesenfeld algorithm . . . . . . . . . . . . . . . 113.2.4 Schaefer’s algorithm . . . . . . . . . . . . . . . . . . . . . 12

4 Subdivision 144.1 Curves: the univariate case . . . . . . . . . . . . . . . . . . . . . . 14

4.1.1 The context-sensitive approach . . . . . . . . . . . . . . . 144.1.2 The context-free approach . . . . . . . . . . . . . . . . . . 16

4.2 Surfaces: the bivariate case . . . . . . . . . . . . . . . . . . . . . . 194.2.1 The tensor product . . . . . . . . . . . . . . . . . . . . . . 194.2.2 Using stellar operators . . . . . . . . . . . . . . . . . . . . 20

Catmull-Clark . . . . . . . . . . . . . . . . . . . . . . . . . 21Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Implementation . . . . . . . . . . . . . . . . . . . . . . . . 24

4.2.3 Additional methods . . . . . . . . . . . . . . . . . . . . . . 24

5 Conclusion 25

References 28

ii

Page 4: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

1 Introduction

Ever since I encountered fractals, I have been fascinated by them – whetherthey are purely artistic, or natural approximations (structures like the Romanocauliflower or Lichtenberg figures). Whilst looking for a way to describe fractals,I stumbled upon the notion of Lindenmayer systems – a very elegant method todescribe the most beautiful structures.

A few years later, while studying subdivision schemes, I came across a papercombining the two topics [PSSK03]. With renewed interest I started workingon basic implementations for L-systems in Python and Matlab1. Eventually Imade some improvements for the existing L-system extension2 for Inkscape (avector graphics editor).

The approach of using L-systems to describe subdivision schemes is quiteappealing, because it clearly illustrates the local characteristics of the schemesin a very natural way. One of the additional features of L-systems is its paral-lel nature, which could be exploited to optimize the required computations forsubdivision [MP03].

This report starts with introducing Lindenmayer systems and its main exten-sions, using some graphical illustrations to explain the different concepts. Next,the theory of B-splines and in particular knot-insertion will be briefly summarizedusing the blossoming approach.

The subsequent section forms the main part of this report – it provides anoverview of the published papers on the conjunction of subdivision schemes andL-systems, both for the univariate and bivariate case.

We hope that this concise survey will be an inspiration for future research!

1Matlab’s built-in command Lsys provides some rudimentary tools for working with L-systems.

2The improved version of the extension, along with some instructions on how to use it, canbe found on the Inkscape Forums: http://www.inkscapeforum.com/.

1

Page 5: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

2 Lindenmayer systems

Lindenmayer systems have a surprisingly widespread application. Although itwas originally designed for modeling the growth of plants and algae [PL90],it has been used for entirely different purposes such as sheet music generation[Pru86b, Man06b, McC96] and neuron modeling [JKC+02]. A particularly goodintroduction to L-systems is given in [Ers02].

This section discusses the formal definition of an L-system, a few importantextensions, and very briefly some thoughts on how to set up an appropriateL-system.

2.1 Definition

The most basic form of a Lindenmayer system consists of an alphabet Σ (i.e. aset of symbols), a set of rewriting rules Π (also called production rules), and aninitial string, the axiom ω. In a concise notation, it can be written as a tupleG = (Σ,Π, ω). Lets take a look at these three components in some more detail.

The alphabet Σ is a set of symbols, i.e. {s1, s2, ..., sn}. Any sequence ofsymbols is called a word, and the set of all finite words is notated as Σ∗. Foreach symbol s ∈ Σ, there is a production rule p ∈ Π that maps the symbol to aword (note that a word can be empty). Therefore we can write p : Σ→ Σ∗. Theaxiom is the initial word.

In every iteration, all production rules are executed simultaneously, so notsequentially. Furthermore, the new word is created from scratch (i.e. the newword is not obtained by modifying the existing old word).

2.1.1 Example

To illustrate the concept, lets take a look at an often used example, the Fi-bonacci L-system. The alphabet is Σ = {A,B}, the production rules are A →B and B → AB, and the axiom is ω = A. After one iteration, our ax-iom A has been rewritten to the word B (using the production rule A →B). In the second iteration this B is rewritten to AB (using the rule B →AB). Subsequent iterations (all using both production rules) result in the fol-lowing words: BAB,ABBAB,BABABBAB,ABBABBABABBAB, . . .. Thelength of the words increases according to the well-known Fibonacci sequence(1, 1, 2, 3, 5, 8, 13, 21, . . .). Moreover, the number of As and Bs in each string arerelated to the Fibonacci sequence as well!

2.2 Graphical interpretation

In 1986, Prusinkiewicz [Pru86a] wrote an article on the graphical interpretation3

of the words produced by an L-system. Lets first introduce a new L-system, after

3The approach uses 2D Turtle graphics (imagine a moving turtle holding a pen). Extensionsfor 3D navigation exist as well.

2

Page 6: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

which we will explain the concept.

Σ = {F,+,−}Π = {{F → F + F −−F + F}, {+→ +}, {− → −}}ω = F −−F −−F

The idea is that the symbol F represents a line of a certain length, say 100 pixels.The + and − symbols are interpreted as rotations (to the left and to the rightrespectively), so therefore we should define two angles α and β (in this case, theyare both 60◦). The initial orientation can be anything, lets define it as 90◦ (sothe initial drawing orientation will be horizontal, from left to right).

Figure 2.1 illustrates the graphical interpretation of the axiom, along with afew iterations. The eventual curve is called the Koch Snowflake.

Figure 2.1: The black dot marks the starting position, the arrow the initialorientation. The leftmost curve (the axiom ω) consists of three lines and tworotations (−− is a single rotation of 120◦ to the right).

Notice that the last two rules merely rewrite the appropriate symbol to itself(i.e. +→ +). These special production rules are usually omitted – if there is norule for a symbol, it is implicitly interpreted that it is rewritten to itself. Anotherapproach is to define these symbols as constants.

2.2.1 Scaling

The observant reader might remark that the iterations depicted in Figure 2.1 areactually scaled versions of the real results. After all, each symbol F correspondsto a line with a length of 100 pixels – without scaling the length, the curve wouldgrow after each iteration. See Figure 2.2.

Figure 2.2: Graphical interpretation of the production rule F → F+F−−F+F .The original rule would look like the left one, the scaled one uses the one on theright.

The L-system that was used to generate Figure 2.1 is actually slightly differ-

3

Page 7: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

ent:

Σ = {F,X,+,−}Π = {{F = F + F −−F + F}, {X = @I3X}}ω = XF −−F −−F

The extra rule for the symbol X takes care of the scaling. The @ token, whichis merely an indication of an upcoming scale (it is not really a symbol althoughit could be interpreted as such), is followed by either zero, one or two charactersand a factor.

If there is only a factor, it is used to scale the current length (e.g. a factor of2 results in a line twice as long). The prefixed characters could be I (the inverseof the factor is used), Q (the square root of the factor is used), or IQ (the inverseof the square root of the factor is used)4.

In our case, @I3X means that the length is scaled by the inverse of 3, so 13.

The symbol X is included for the next iteration (which should again be scaledby 1

3).

2.2.2 Brackets

A very useful extension is the bracketed L-system. The additional symbols [ and] are added to the alphabet, and act as operators for a stack. When the L-systemencounters the [ symbol, it pushes the current location, orientation and lengthonto the stack, after which it continues processing the string. The ] symbolpops the entry on top of the stack, and uses it to change (reset) the location,orientation and length. This allows the design of branched systems, like plantsand trees. Figure 2.3 illustrates an example.

Figure 2.3: Tree. The used L-system: Σ = {F, T, U,+,−}, Π = {{T →@IQ2[+FU ][−FT ]}, {U → @IQ2[−FT ][+FU ]}}, ω = FT . The right angleis 60◦, the left angle 40◦. The initial orientation is 0◦.

2.2.3 Euler cycles

A lot of fractals can be described with L-systems. Two examples (the Sierpinskitriangle5 and Pythagoras tree) are depicted in Figures 2.4 and 2.5. A naturalapproach would be to use a bracketed system for both the Sierpinski fractal asthe Pythagoras tree.

4Similar syntax was presumably first used by the computer program Fractint: seehttp://www.fractint.org/.

5There is a striking resemblance between the Pascal triangle and the Sierpinski triangle: alarge Pascal triangle with only the odd numbers highlighted approaches the Sierpinski fractal.

4

Page 8: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

However, when interpreting these fractals as graphs, it turns out that eachnode in the graph has an even degree (an even number of in- and outgoing edges).Therefore, there exists an Euler cycle (a cycle that visits every edge only once,and returns to the starting point). This way, no brackets are required!

Figure 2.4: The Sierpinski triangle. The used L-system: Σ = {A,B,X,+,−},Π = {{A→ A−B+A+B−A}, {B → BB}, {X → @I2X}}, ω = XA−B−B.Both angles are 120◦, the initial orientation is 270◦.

Figure 2.5: The Pythagoras tree. The used L-system: Σ = {F, T,+,−}, Π ={{T → −@IQ2FT + +F + +F −−FT + +F + +F + +F −−F + + + @Q2}},ω = FT + +F + +F + +F . Both angles are 45◦, the initial orientation is 0◦.

Two other examples of L-systems are space filling curves (like the Hilbertcurve) and tilings (like the P3 rhombus Penrose tiling).

2.2.4 Other extensions

Finally, L-systems can be extended with several other concepts, resulting instochastic, parametric and context-sensitive L-systems.

For stochastic L-systems, a single symbol s ∈ Σ might have multiple produc-tion rules. Every production rule has a certain chance of being used. A simpleexample are the two rules for the symbol A: A{.3} → AB and A{.7} → BA,where the first rule has a chance of 30% of being used, the second rule 70%.Non-stochastic L-systems are also called deterministic L-systems.

In parametric L-systems, each symbol can have a list of parameters (a symbolwith such a parameter list is called a module). These parameters can be used inthe production rules, as illustrated by the following attempt to model a realistictree. Consider the symbol A and two parameters, t and a. The former could be

5

Page 9: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

interpreted as the type of the symbol (e.g. a branch, leaf or flower), the latter asthe age of the symbol. An appropriate rule could be A(t, a)→ A(t, a+1)A(t, 1),which ages an existing part of the tree by one unit of time (for instance by oneday), and extends it with a new part. Note that this extension does not makemuch sense if the type of the symbol is either a leaf or a flower (a leaf would beextended by another leaf). To fix this, a condition can be used on the value ofone or more parameters. Using the ranking {branch = 0, leaf = 1, f lower = 2},the rule could be changed to A(t, a) : t = 0 → A(t, a + 1)A(t, 1). Appendingmore complicated rules, such as adding leaves when a branch reaches a certainage, could lead to a realistic model of a tree.

Eventually, context-sensitive L-systems provide to ability to consider one, twoor more neighbours of a symbol, and use these neighbours in a production rulefor the symbol. This type of L-system usually has multiple production rules for asymbol (not unlike a stochastic L-system), the context determines which one willbe used. To illustrate, consider the two rules for the symbol B: A 〈 B → CD and# 〈 B → D. When B is preceded by A, the first rule is used and B is replacedby CD. If no symbol precedes B (i.e. B is the first symbol in the string), thesecond rule is used and B is replaced by D. Along with parametric L-systems,this extension is the key for using L-systems in combination with subdivision.

Short notations like D0L, D1L and D2L are often used, to indicate that theL-system is deterministic, and considers respectively 0, 1 or 2 neighbours. In theformer case, the L-system is called context-free.

Additionally, more indicators6 (like the scaling indicator @) can be used,for instance to change the width or the color of the lines. Combining all thesefeatures provides the possibility to model highly realistic structures, like 3D trees.

3 B-splines and knot insertion

Before we make the connection between L-systems and subdivision, lets first takea brief look at B-splines [Sal06, Gol03] and a couple of knot-insertion algorithms[LG87] for B-spline curves.

3.1 B-splines

B-spline curves are piecewise7 polynomial curves, that approximate some givenset of control points. In order to define a B-spline curve, we require three piecesof information:

1. A set of p control points. The linear interpolation of the control points iscalled the control polygon.

2. The degree8 d of the curve – degree 2 indicates that the curve is quadratic,

6The concept of indicators could be replaced by parametric symbols, resulting in even moredynamic structures.

7B-spline curves can be decomposed into their individual segments, the Bezier curves.8Note that the term order is not interchangeable with degree – it is defined as degree +1

[PBP02, Sal06].

6

Page 10: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

degree 3 refers to a cubic curve and so on.

3. The knot-vector Ξ = [t1, t2, . . . , tk]. This is a non-decreasing list of valuesti ∈ R (so ti 6 ti+1). The number of knots is k.

Each control point Pi has an associated basis function Bdi (t), a B-spline9.

3.1.1 The Cox-de Boor relation

These basis functions are often defined using the Cox-de Boor recurrence relation[Cox72, dB72]:

B0i (t) =

{1 if t ∈ [ti, ti+1)

0 otherwise

Bdi (t) =

t− titi+d − ti

Bd−1i (t) +

ti+d+1 − tti+d+1 − ti+1

Bd−1i+1 (t)

Recall that a line is uniquely defined by two control points. Similarly, a quadraticcurve is uniquely defined by three control points, a cubic curve by four controlpoints and so on. In terms of basis functions, this means that a degree d curveis only properly defined when d + 1 basis functions have support10. Figure 3.1illustrates the B-splines (the basis functions) for a degree 2 curve, using theknot-vector Ξ = [2, 3, 4, 5, 5, 7, 8, 9]. The number of control points follows froma simple formula associated with the Cox-de Boor relation: k = p + d + 1, soin this case there are 5 control points P1 . . .P5 (and hence 5 basis functionsB2

1(t) . . . B25(t)).

2 3 4 5 6 7 8 90

0.2

0.4

0.6

0.8

1

Figure 3.1: Quadratic B-splines for the knot-vector Ξ = [2, 3, 4, 5, 5, 7, 8, 9]. Thecorresponding curve is only properly defined on the interval t ∈ [4, 7], since onlyon this interval there are enough basis functions (i.e. 3 basis functions) that havesupport. This is indicated by the dashed rectangle.

Notice that the parts of the basis functions within the dashed rectangle donot change when the first and last knot are assigned a different value (see Figure3.2). This can be confirmed by carefully examining the Cox-de Boor relation.

9The basis functions are called B-splines, the actual curve is a B-spline curve.10Only where there is full support, the B-splines form a partition of unity – each point on

the resulting curve is therefore an affine combination of the participating control points.

7

Page 11: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

1 2 3 4 5 6 7 8 9 10 110

0.2

0.4

0.6

0.8

1

Figure 3.2: Quadratic B-splines for the knot-vector Ξ = [ 1 , 3, 4, 5, 5, 7, 8, 11 ].The parts of the basis functions within the dashed rectangle are not affected ifthe first and/or last knot are assigned a different value.

3.1.2 Blossoming

In the remaining part of this report we will mainly make use of a different methodto associate the control points and the control polygon with the basis functions(and thus the knot-vector), called blossoming [Ram87, Sei89, Man06a]. Becausethis approach only considers the curve, the first and last knots can be omitted.The formula for k therefore changes to k = p + d − 1. The knot-vector forblossoming will be indicated as Ξ′.

The blossom (also called polar form) is basically a way to rewrite a parametricpolynomial with a single variable of power n to a parametric polynomial functionthat uses n variables of only power 1. An example to elucidate this principle isadded below, where the original function11 x(t) is rewritten to its blossom x(u, v).The new expression uses two variables, since the highest power of the old variablet is 2. The new function x(u, v) is therefore a surface.

x(t) = −6t2 + 8t+ 1

x(u, v) = −6uv + 8(u+ v)

2+ 1 = −6uv + 4(u+ v) + 1

The blossom has four very useful properties (for clarity they are explainedfor the quadratic case C(u, v), but they hold for all degrees d):

1. The symmetric property — C(a, b) = C(b, a), the order in which the vari-ables appear does not matter.

2. The multi-affine property — if ξ = (1−α)x+αy, then the point C(ξ, b) =C ((1− α)x+ αy, b) = (1− α)C(x, b) + αC(y, b).

3. The diagonal property — C(γ, γ) corresponds to the point C(γ) on theoriginal curve C(t).

4. A consequence of the above properties is the dual property — using theknots ti and ti+1, the point C(ti, ti+1) corresponds to the position of controlpoint Pi.

11Note that a 2D parametric curve requires two functions, x(t) and y(t) (a 3D curve requiresan additional function z(t)). An often used shorthand notation for such a curve is C(t).

8

Page 12: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

In other words, the blossoming approach associates d consecutive knots witheach control point, such that the last d − 1 knots are the first d − 1 knots ofthe next control point (i.e. there is a certain overlap). Lets look at an arbitraryquadratic B-spline curve C(t) =

∑PiB

di (t) corresponding to Ξ′ = [3, 4, 5, 5, 7, 8]

(see Figure 3.3). Each control point has d = 2 associated knots written next toit.

(3,4)

(4,5)

(5,5)

(5,7)

(7,8)

Figure 3.3: Arbitrary quadratic B-spline curve, associated with Ξ′ =[3, 4, 5, 5, 7, 8]. Each control point is associated with two consecutive knots. Thethree circles mark the joints of the curve (i.e. the boundaries of the Beziercurves that constitute the B-spline curve).

Using the above properties, we can observe the following qualities in the curvein Figure 3.3.

– The labels associated with each control point Pi are due to the dual prop-erty. Note that a label (ti, ti+1) is a shorthand notation for C(ti, ti+1).

– The curve interpolates control point P3 associated with the label (5, 5),which is confirmed by the diagonal property.

– The order of the variables in a label can be changed (see Figure 3.4) dueto the symmetric property.

– Using the multi-affine property, the labels (4, 4) and (7, 7) can be found(see Figure 3.4).

(3,4)=(4,3)

(4,5)=(5,4)

(5,5)

(5,7)=(7,5)

(7,8)=(8,7)

(4,4)

(7,7)

Figure 3.4: Same curve as in Figure 3.3, with some of the above qualities illus-trated.

9

Page 13: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

3.2 Knot-insertion

Knot insertion is the process of inserting a new knot into some interval [ti, ti+1]in the knot-vector Ξ′, without changing the corresponding curve. There are anawful lot of insertion algorithms, all behaving slightly different. One distinction[Rog00, PT97] that is sometimes used, is the difference between knot insertionand knot refinement. The former only inserts a single knot, whereas the latterinserts multiple knots at once.

When one or more knots are added (k increases), note that according to theformula k = p+ d− 1, we can either add control points or increase the degree ofthe curve. In most cases, the choice is made to add control points.

Using the blossoming approach we will briefly explain some of the main al-gorithms.

3.2.1 Boehm’s algorithm

Boehm’s algorithm is a knot-insertion algorithm. Lets continue with our examplefrom Figure 3.3, and recall that we used the knot-vector Ξ′ = [3, 4, 5, 5, 7, 8]with the associated labels (3, 4), (4, 5), (5, 5), (5, 7) and (7, 8). When we chooseto insert a value 6 in the interval [t4, t5], the new knot-vector becomes Ξ′ =[3, 4, 5, 5, 6, 7, 8].

Looking at the associated labels of the new knot-vector, we see that (5, 7) isreplaced by the two new labels (5, 6) and (6, 7). Using the blossoming properties(more exactly, the multi-affine property), we can find these labels. The first oneis located exactly between (5, 5) and the old label (5, 7), the second one betweenthe old label (5, 7) and (7, 8), with a ratio 1 : 2. See Figure 3.5. In general, theposition of a new control point is an affine combination of old control points.

(3,4)

(4,5)

(5,5)

(5,7)

(7,8)

(6,7)

(5,6)

Figure 3.5: Boehms knot insertion algorithm illustrated using blossoming: twonew labels (5, 6) and (6, 7) replace the old label (5, 7).

Notice that the control polygon (the dashed line interpolating the controlpoints) now better resembles the curve. Additionally, a joint has been added(the B-spline curve now consists of three Bezier curves), corresponding to thelabel (6, 6).

3.2.2 The Oslo algorithm

The Oslo-algorithm inserts multiple knots in a single interval of the knot-vector.If instead of the value 6, we choose to insert two values 51

2and 61

2, we need to

10

Page 14: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

find the new labels (5, 512), (51

2, 61

2) and (61

2, 7). The problem is that the label

(512, 61

2) cannot be found directly – an auxiliary label is required. Often there are

multiple possibilities, lets choose the label (512, 7) = (7, 51

2) which can be located

directly. The label (512, 61

2) then lies on the auxiliary line between labels (51

2, 5)

and the auxiliary label (512, 7). See Figure 3.6.

(3,4)

(4,5)

(5,5)

(5,7)

(7,8)

(5,5½)

(6½,7)(5½,7)

(5½,6½)

Figure 3.6: The Oslo algorithm illustrated using blossoming. The auxiliary label(51

2, 7) and auxiliary line are indicated with a green color.

Two joints have been added, corresponding to respectively (512, 51

2) and (61

2, 61

2).

The B-spline curve now consists of four Bezier segments. Notice that the controlpolygon resembles the actual curve even more after inserting multiple knots.

Historically there are two different Oslo algorithms – one that calculates aconversion matrix to convert the old control points to the new ones12, and anotherone that directly calculates the positions of the new control points. Furthermore,a few improvements to the algorithm have been suggested [Gol90]. The generalpurpose of the Oslo algorithm(s) is to use one or more auxiliary labels13 in orderto find the new control points (with as little operations as possible).

3.2.3 The Lane-Riesenfeld algorithm

The Lane-Riesenfeld [LR80] algorithm only works for uniform knot-vectors, i.e.knot-vectors with a constant distance between every two consecutive knots (ex-amples are Ξ′ = [0, 1, 2, 3, 4, 5] or Ξ′ = [2, 5, 8, 11, 14]). It inserts a knot exactlybetween every two consecutive knots – midpoint knot-insertion (or rather, knot-refinement).

The algorithm is in fact a generalization of Chaikin’s algorithm [Cha74].Chaikin’s algorithm is a graphical approach to let the control polygon of aquadratic uniform B-spline curve converge to the B-spline curve itself. It isaccomplished by replacing each original control point Pi by two others (Q2i−1and Q2i), according to the following rules:

Q2i−1 =1

4Pi−1 +

3

4Pi, Q2i =

3

4Pi +

1

4Pi+1. (3.1)

12Each row of this matrix adds up to one, since the new control points are affine combinationsof the old ones.

13A schematic method of explaining these and similar algorithms are the triangle diagrams[Gol03], resulting in the generic term pyramid algorithms.

11

Page 15: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

The method is illustrated in Figure 3.7. Using the blossoming approach, itis easily seen that Chaikin’s algorithm is in fact midpoint knot-refinement forquadratic B-spline curves.

(0,2)

(2,4)

(4,6)

(6,8)

(8,10)

(0,2)

(2,4)

(4,6)

(6,8)

(8,10)(1,2)

(2,3)

(3,4)

(4,5)

(5,6)

(6,7)

(7,8)

(8,9)

Figure 3.7: Chaikin’s algorithm (one iteration). Only the control polygon isdrawn. The same rules cannot be used for the boundaries (note the missinglabels (0, 1) and (9, 10)), we’ll come back to this later.

Starting with the initial control points P 0i (i = 1, 2, . . . , n), Lane-Riesenfeld

generalizes this approach as follows:

1. Duplicate all existing control points: P 12i−1 = P 0

i , P 12i = P 0

i .

2. Average each two consecutive points: P 2i = 1

2(P 1

i + P 1i+1). Depending on

the desired degree d, apply this step d times.

These two steps form a single iteration of the algorithm. An iteration forthe cubic case is illustrated in Figure 3.8. The knotvector used in this ex-ample is Ξ′ = [0, 2, 4, 6, 8, 10], so after one iteration the new one will be Ξ′ =[0, 1 , 2, 3 , 4, 5 , 6, 7 , 8, 9 , 10]14. By repeating the process, the control poly-gon will converge to a degree d uniform B-spline.

A nice property of this algorithm is that the degree d does not have to beknown beforehand – each additional averaging step increases the degree of thelimit curve by one.

Using blossoming15, we can see that there are two rules for the cubic case:one new control point gets inserted at the midpoint of each edge (Q2i−1 = 1

2(Pi +

Pi+1)), and another one gets inserted according to the rule Q2i = 18(Pi−1 + 6Pi +

Pi+1).

3.2.4 Schaefer’s algorithm

In contrast to the Lane-Riesenfeld algorithm, this algorithm can also be usedfor non-uniform B-spline curves (i.e. a knot-vector with different knot-intervals).Furthermore, the new knots are not necessarily inserted at the midpoints, butcan be chosen freely.

14Again, the boundaries are treated a little different – therefore the labels (0, 1, 2), (1, 2, 3),(7, 8, 9) and (8, 9, 10) are not displayed.

15The rules can certainly be deduced with blossoming, but not as easy as Chaikin’s algorithm(which is equal to the d = 2 Lane-Riesenfeld algorithm). It can however be deduced directlyfrom Schaefer’s algorithm.

12

Page 16: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

(0,2,4)

(2,4,6)

(4,6,8)

(6,8,10)

(0,2,4)

(2,4,6)

(4,6,8)

(6,8,10)

(2,3,4)

(4,5,6)

(6,7,8)

(0,2,4)

(2,4,6)

(4,6,8)

(6,8,10)

(2,3,4)

(4,5,6)

(6,7,8)

(1½,2,4)

(2,4,4½)

(3½,4,6)

(4,6,6½)

(5½,6,8)

(6,8,8½)

(0,2,4)

(2,4,6)

(4,6,8)

(6,8,10)

(2,3,4)

(4,5,6)

(6,7,8)

(1½,2,4)

(2,4,4½)

(3½,4,6)

(4,6,6½)

(5½,6,8)

(6,8,8½)

(4,5,6)

(6,7,8)

(2,3,4)

(3,4,5)

(5,6,7)

Figure 3.8: A single iteration of the Lane-Riesenfeld algorithm for the cubic case:duplicating the control points followed by d = 3 steps of averaging.

To illustrate Schaefer’s algorithm [SG09], lets use the same knot-vector as forthe Lane-Riesenfeld algorithm: Ξ′ = [0, 2, 4, 6, 8, 10]. The method is illustrated(using midpoint knot-refinement) in Figure 3.9.

(0,2,4)

(2,4,6)

(4,6,8)

(6,8,10)

(0,2,4)

(2,4,6)

(4,6,8)

(6,8,10)

(3,4,6)

(1,2,4)

(5,6,8)

(0,2,4)

(2,4,6)

(4,6,8)

(6,8,10)

(3,4,6)

(1,2,4)

(5,6,8)

(1,2,4)

(3,4,6) (5,6,8)(4,5,6)

(2,3,4)

(6,7,8)

(0,2,4)

(2,4,6)

(4,6,8)

(6,8,10)

(3,4,6)

(1,2,4)

(5,6,8)

(1,2,4)

(3,4,6) (5,6,8)(4,5,6)

(2,3,4)

(6,7,8)(6,7,8)

(4,5,6)

(2,3,4)

(3,4,5)

(5,6,7)

Figure 3.9: One iteration of Schaefer’s algorithm. Note that while the final resultis the same as for Lane-Riesenfeld, the intermediate steps are fundamentallydifferent. The newly created control points in the previous step are carried overto the current step. New control points are created in an affine fashion (dependingon d) [SG09].

Although this algorithm is much more general than Lane-Riesenfeld’s, the

13

Page 17: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

degree d needs to be known beforehand. It is however a lot faster than Lane-Riesenfeld!

4 Subdivision

Subdivision is basically the convergence of the control polygon (or control net)to the actual curve (or surface). As we have seen in the previous section, knot-insertion causes the control polygon to converge to the curve. The Chaikin andLane-Riesenfeld methods introduced the concept of a stencil, i.e. a formula forcalculating a position of a new vertex. The notion of stencils can be generalizedto other curves (i.e. curves that are not B-splines). In addition, the concept ofknot-insertion and stencils can be extended to surfaces (and even solids).

A few excellent sources on subdivision are [AS10, PR08, WW02], and someparts in [Sal06]. A lot of papers have been published on different aspects of thesesubdivision schemes, including some combining subdivision with Lindenmayersystems. In this section, the connection between L-systems and subdivision isexplained.

4.1 Curves: the univariate case

Univariate subdivision schemes [Sab10] can be classified by at least the followingfour properties:

1. The curve will either approximate or interpolate the control points.

2. When the scheme is uniform, the same rules are applied for every controlpoint. As a corollary, a non-uniform scheme consists of multiple rules.

3. A scheme that is the same for each iteration is called stationary. A schemewhose rules change throughout the interations is non-stationary.

4. The fashion in which new control points are calculated, is either linear (i.e.the rules are affine combinations) or non-linear (e.g. using trigonometricfunctions).

The first paper that related L-systems to subdivision [PSSK03] considers bothapproximating and interpolating schemes, as well as uniform and non-uniformschemes. It could however be used for non-stationary and non-linear schemesas well, as we will illustrate. However, regarding B-splines, the method can ingeneral only be used for uniform knot-vectors. The approach is context-sensitive.

Another paper [NGOS12] uses a different approach (context-free), making issuitable for non-uniform knot-vectors. Since it uses knot-vectors, only subdivi-sion schemes related to B-splines can be used.

4.1.1 The context-sensitive approach

The method used in this paper [PSSK03] is a graphical one: the positions of newvertices are calculated using only the positions of existing vertices (i.e. using

14

Page 18: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

stencils). Graphical interpretations are readily understood, and can be quitegeneral (they are not restricted to merely B-spline curves). However, because theunderlying machinery (like the knot-vector) is obscured, it is not immediatelyclear that with regard to B-spline curves, the approach can only be used foruniform ones.

As already shown by the Lane-Riesenfeld algorithm, the concept of midpointknot-refinement can be explained in a graphical way. Earlier on it was indicatedthat each control point has an index, Pi. This means that control points canbe ordered in a natural way. When they are written as a string P1P2 . . .Pn,the control polygon (interpolating the control points) is implicitly defined: eachcontrol point is connected to its neighbours.

The idea is to use a parametric and context-sensitive L-system to definethe curve and the rules. Using a single symbol P , with as parameters its co-ordinates, we have a module P (x, y), also written P (v). Subsequently, theneighbours of a module P (x, y) are indicated using angle brackets (chevrons):P (vl) 〈 P (v) 〉 P (vr), where P (vl) is the left neighbour of P (v) and P (vr) itsright neighbour. This way, the rule from (3.1) can be written as

P (vl) 〈 P (v) 〉 P (vr)→ P (1

4vl +

3

4v)P (

3

4v +

1

4vr).

Note that this approach does not use indices. Naturally, it can be used for theLane-Riesenfeld algorithm. The cubic case could be written as

P (vl) 〈 P (v) 〉 P (vr)→ P (1

8vl +

6

8v +

1

8vr)P (

1

2v +

1

2vr).

The paper also include an example for the interpolating 4-point scheme. Moreinteresting are the rules for boundaries – a vertex on the boundary only has oneneighbour after all. In addition, we can take a look at curves that interpolatethe first and last vertices16. Using blossoming, we can easily derive the differentrules for mid-point knot-refinement in the quadratic case. See Figure 4.1.

(0,0)

(0,2)

(2,4)

(4,6)

(6,6)

(0,0)

(0,2)

(2,4)

(4,6)

(6,6)

(0,0)

(6,6)

(0,1)

(1,2)

(2,3)(3,4)

(4,5)

(5,6)

Figure 4.1: Starting with knot-vector Ξ′ = [0, 0, 2, 4, 6, 6], we perform midpointknot-refinement, resulting in Ξ′ = [0, 0, 1, 2, 3, 4, 5, 6, 6]. It is clear that in thiscase, we actually have five different rules.

From the example in Figure 4.1 it turns out that there are in fact five differentrules. By indicating the start and end of the word/string with an additional

16Strictly spoken, the corresponding knot-vector is non-uniform. This is however a specialcase that can be used in conjunction with Lane-Riesenfeld.

15

Page 19: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

symbol #, and accessing multiple neighbours, we can write them as

# 〈 P (v)→ P (v)

#P (vl) 〈 P (v) 〉 P (vr)→ P (1

2vl +

1

2v)P (

3

4v +

1

4vr)

P (vll)P (vl) 〈 P (v) 〉 P (vr)P (vrr)→ P (1

4vl +

3

4v)P (

3

4v +

1

4vr)

P (vl) 〈 P (v) 〉 P (vr)#→ P (1

4vl +

3

4v)P (

1

2v +

1

2vr)

P (v) 〉 #→ P (v)

Note that the first and last rules could be omitted (it will then be implicitlyinterpreted as a symbol being rewritten to itself). The same applies to theadditional symbol #.

In [PSS10] the same approach is used for a couple of different applications,such as the de Casteljau algorithm and rational curves. The convergence of acurve to a circle would perhaps be done using NURBS – a different approachwould be to use a non-stationary scheme that takes different affine combinationsevery iteration in order to converge to a circle (or in general, conic curve).

The concept can also be used for some of the non-linear subdivision schemespresented in [SVG07]. In a nutshell, this paper explains how to replace theaveraging operator used in midpoint knot-refinement (i.e. the arithmetic mean)by a different kind of averaging (e.g. geometric or harmonic means).

As example, we look at an averaging rule that is deduced from the cosine[SVG07]. Writing it in L-system format yields17

P (v) 〉 P (vr)→ P (v)P

(√(1 + v)(1 + vr)−

√(1− v)(1− vr)

2

)Starting with a diamond shaped curve (i.e. the axiom is ω = P (0, 1)P (1, 0)P (0,−1)P (−1, 0)), we can use this scheme to converge to a circle. See Figure4.2.

Figure 4.2: Diamond shaped curve converging to a circle, using the above non-linear subdivision scheme.

4.1.2 The context-free approach

Instead of using the control points (vertices), we could use the knots. Using themdirectly would result in another context-sensitive method, but when instead the

17When interpreting the word as a circular word, this single rule suffices. Otherwise weshould include some additional rules that can deal with the boundaries.

16

Page 20: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

interval lengths (i.e. the knot-intervals) are used, a context-free method can bederived. In [NGOS12] such a method is explained – it uses production rules forlabels associated with the interval lengths. There are however a few obstaclesthat need to be considered.

A knot-vector consisting of k knots obviously has k − 1 intervals. Of course,some of these interval lengths could be the same (recall that for a uniform knot-vector all intervals are equal). Therefore, we create a new list of intervals, inwhich every interval appears only once. The result is a list of unique intervals.Consider for example the knot-vector Ξ′ = [1, 2, 4, 5, 6, 8] which has the intervals[1, 2, 1, 1, 2] – the list of unique interval lengths would be {1, 2}.

The next step is to assign a label Ai to each unique interval length ai. Ifour new list of intervals would contain n unique intervals {a1, a2, . . . , an}, wewould end up with the labels A1, A2, . . . , An. The key concept of this context-free approach is to start with only these labels Ai, and set up the productionrules. Although it might seem counter intuitive, at this moment we do not knowthe interval lengths ai associated with the labels.

As example, assume that we have three (n = 3) unique (but yet unknown) in-terval lengths {a1, a2, a3} with labels A1, A2 and A3. Note that these labels couldserve as an alphabet Σ to be used for an L-system! Accompanying productionrules could be the following ones:

A1 → A2A2

A2 → A3

A3 → A1A2A1

(4.1)

The interpretation of these production rules is that each interval corresponding toa label A1 is split into two equal intervals (one knot is inserted at the midpoint).Intervals corresponding to A2 are replaced with a different interval correspondingto A3 (no knots are inserted). Finally, intervals corresponding to A3 are replacedwith three intervals (two knots are inserted, with non-uniform spacing). SeeFigure 4.3.

A3 A2 A1 A2

A3A1 A2 A1 A3 A2 A2

Figure 4.3: Starting with the axiom ω = A3A2A1A2, the first iteration resultsin the word A1A2A1A3A2A2A3. Each iteration implicitly inserts new knots,indicated in green. Note that we are looking at the parametric domain.

We should make sure that every interval is replaced by a list of intervalsadding up to the same length as the old interval (see Figure 4.3). Clearly, this isnot the case in the second production rule A2 → A3 (label A2 corresponds to aninterval length a2, which is by definition different from a3, labeled as A3). Themethod therefore uses a scaling constant ρ, which is the same for each rule and

17

Page 21: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

for each iteration. This means that the interval length ai associated to a label Ai

depends on the iteration step s: a(s)i = a

(0)i /ρs. Note that the s in a

(s)i indicates

an index, whereas in ρs it is a power. A simple example would be midpoint knot-refinement (for both the uniform case like Lane-Riesenfeld, or the non-uniformcase like in [SZSS98]). Every label Ai is rewritten to AiAi – obviously, ρ = 2 inthis case. For the uniform case, the initial interval length (there is after all only

one unique interval) could be a(0)1 = 1, which means that the iterated interval

lengths would be a(s)1 = 1/ρs = 1/2s = 2−s.

Therefore, for our example the following should hold (for clarity the indices(s) are omitted):

a1 =2a2ρ, a2 =

a3ρ, a3 =

2a1 + a2ρ

or equivalently,

ρa1 = 2a2, ρa2 = a3, ρa3 = 2a1 + a2. (4.2)

A short notation for the above production rules (4.1) is a n × n matrix M , inwhich the ith row corresponds to the production rule pi. The value of M(i, j) isthe number of occurrences of Aj in the right hand side of the production rule pi.For our example, the matrix would be

M =

0 2 00 0 12 1 0

.

Notice that such a matrix is shared by multiple L-systems: changing the thirdrule to A3 → A1A1A2 results in the same matrix.

We can now write (4.2) as

ρ~a = M~a, ~a = [a1, a2, a3]T .

If18 we can find a strictly positive eigenvector (all entries should be greater than0) with an accompanying eigenvalue (which should be greater than 1), we can usethe values as lengths ~a for our intervals and as value for the scaling parameterρ, respectively.

The condition for the entries of the relevant eigenvector is rather trivial: in aknot-vector there are only non-negative intervals19. The condition for the scalingparameter also makes sense – if we want the control polygon to converge to thecurve, we should insert knots, resulting in smaller knot-intervals.

18Not all matrices M derived from a certain L-system can be called valid, as pointed out inthe paper.

19Note the difference between positive and non-negative. While an interval of zero length isallowed in a knot-vector, assigning this length to ai corresponding to label Ai could result in alot of trouble when used carelessly – the appearance of Ai on the right hand side of a rewritingrule would trigger the insertion of a zero length interval, resulting in decreased continuity ofthe curve!

18

Page 22: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

In our case (which in retrospect was not the most practical), there is asingle usable eigenvalue, ρ ≈ 1.8 > 1, with the accompanying eigenvector~a ≈ [0.62, 0.56, 1]. Of course, the eigenvector can be scaled by a scalar. There-fore, we can use this subdivision scheme on any knot-vector with these threeintervals (but no other knot-intervals!).

At this point, we can pick an axiom ω, consisting of some sequence of thelabels Ai. An example using ω = A3A2A1A2 is illustrated in Figure 4.3. Notethat the knot-vector is only determined up to an additional constant (this doesnot affect the resulting curve). Applying the production rules result in a longersequence of smaller (scaled) knot-intervals. After each step, we can find thelocation of the new control points, using a blossoming approach. Be aware thatthis step also has some difficulties (the finite20 number of masks can be uniquelydetermined, but the stencils cannot). Clarifying this is therefore outside thescope of this report – for details, see [NGOS12].

To conclude – this method might seem rather impractical to use. Althoughthe paper includes some additional examples, the drawback of this method is thatthe knot-intervals are deduced from the rules, not the other way around. How-ever, the method does provide an interesting new approach to knot-refinement.Where most other algorithms insert a constant number of new knots in eachinterval, this method allows more freedom.

4.2 Surfaces: the bivariate case

Although curves have their use, in the context of subdivision surfaces are muchmore important. This part focuses on using L-systems for the description ofbivariate subdivision schemes.

The main issue is that the extension of L-systems to surfaces is rather prob-lematic. As we have seen, curves (either in 2D or 3D) can be described by L-systems in a very natural way, because vertices are ordered in a certain sequence.However, in the case of a surface, such a trivial sequence is non-existing.

Before discussing the different published methods, lets first take a brief lookat one of the easiest ways to extend a curve to a surface: the tensor product.

4.2.1 The tensor product

The principles for some well known subdivision surface schemes (Catmull-Clark[CC78], Doo-Sabin [DS78]) can be derived from the tensor product of the Lane-Riesenfeld algorithm – the tensor product of the quadratic version with itselfforms the basis for the Doo-Sabin scheme, the cubic version with itself is thebedrock for Catmull-Clark. The tensor product rules are only applicable forquadrilateral faces, where each vertex has a valence of 4. Generalizing the rulessuch that they are also suitable for other polygons and valences is the hard partof designing a suitable bivariate subdivision scheme.

20As explained in the paper, there are relatively few masks and stencils required for com-puting the positions of new control points.

19

Page 23: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

As noted previously, we should keep in mind that an L-system is a stringrewriting system, so there should be a logical ordering of the symbols in thestring. When the symbols are in fact vertices, there is not really an obvious wayof ordering them when they form a surface. Therefore there is no trivial way touse the tensor product method for the context-sensitive approach [PSSK03].

It could be used for the context-free approach [NGOS12] (which uses the knot-intervals instead of the vertices), since a tensor-product surface just needs twoknot-vectors. But again, this would only be applicable for quadrilateral faces andvertices with valence 4. Examining how to handle extraordinary vertices seemsan interesting topic for future research.

4.2.2 Using stellar operators

As indicated in the previous section, there is no trivial way to use a stringrewriting approach for surfaces. However, when the notion of a string or word isgiven a broader meaning, we can continue using L-systems to describe subdivisionschemes in higher dimensions.

In the method of Velho [Vel03] the classic definition of a string is replaced bya more abstract one – the elements of a triangular mesh form the string. Theaxiom ω is the initial mesh.

A surface mesh consists of vertices V , edges E, and faces F – these three ele-ments can be considered the symbols that constitute the alphabet Σ = {V,E, F}.Using a parametric context-sensitive L-system, existing rules for surface subdi-vision schemes can be written as production rules21 p ∈ Π.

The key concept is to split an existing scheme into refinement and smoothingoperators. The former changes the topology of the mesh, whereas the latter onlyaffects the geometry.

The refinement operators make use of stellar operators22 for modifying trian-gular meshes. The three main operators are edge-flip, edge-split and face-split.The edge-flip operator simply flips the edge shared by the two triangles. Theedge-split operator splits the shared edge (i.e. inserts a new vertex at the mid-point) and connects it to the opposite old vertices (the newly inserted vertexis often relocated to the centroid of the square composed of the two triangles).The face-split operator inserts a new vertex at the centroid of the triangle, andconnects it to the opposite old vertices. The operators are illustrated in Figure4.4.

The smoothing operators use parts of the theory on simplicial complexes.A triangular mesh can be regarded as a simplicial complex (a vertex is a 0-simplex, an edge a 1-simplex and a face23 a 2-simplex). In particular, the one-ring neighbourhood N1(v) of a vertex v can be described using its star St(v)

21Instead of creating the new mesh from scratch (as is the usual way of applying the pro-duction rules), the existing mesh is modified.

22Unlike Euler operators, the use of stellar operators never results in invalid intermediatemeshes. This is one of the main reasons to choose these operators.

23Unfortunately, the word face is also used to describe components of a simplex. For instance,the vertices are faces of an edge, and the vertices and edges are faces of a face (which is atriangle in this context).

20

Page 24: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

[Lic99].

Figure 4.4: Three stellar operators24. The left column illustrates the edge-flipoperator, the middle column the edge-split operator (note that the positionof the new vertex is often immediately updated to the centroid of the squarecomposed of the two triangles) and the right column the face-split operator.

To illustrate the concept, we take ta look at both the Catmull-Clark schemeand Loop’s scheme. Some additional examples are included in the paper [Vel03]– note that Kobbelt’s

√3 scheme [Kob00] uses a face-split and an edge-flip for

the refinement part, whereas the Doo-Sabin scheme uses two edge-splits followedby an edge flip.

Catmull-Clark The Catmull-Clark scheme is designed to work with arbitrarymeshes, which means that all kinds of polygons (n-gons) are supported. Likewise,a vertex can basically have any valence (which is the same as the notion of thedegree for a node in a graph).

Since Velho’s concept is only applicable for triangular meshes, we have topre-process the mesh. For simplicity, lets assume that it only consists of quads(irregular valances n 6= 4 are still allowed). In that case, adding diagonals (in-ternal edges) for every quad suffices. The resulting mesh, now consisting of basisblocks, is called a tri-quad mesh. In order to keep track of the internal edges, weassign a level to each element. All vertices start as level 0, all original edges withlevel 1 and all internal edges with level 0. Note that this pre-processing step onlyneeds to be applied once. See Figure 4.5.

In [Vel00], the Catmull-Clark scheme is decomposed into its refinement andsmoothing operators. The result is a set of three production rules. A productionrule for a symbol S ∈ Σ uses the following syntax:

S(s; condition)| context→ T (t = operation)‖ new context

The actual production rules (deduced from the original Catmull-Clark stencils)

24The original paper makes a distinction between (bi)stellar moves and stellar subdivisionoperators. It also describes the additional operators edge weld and face weld.

21

Page 25: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

are:

E(e; level(e) = c)|F 2 → V (v = average (N1(v)) ‖E4F 4

V (v; level(v) < c)→ V (v = CatmullClark(v))

E(e; level(e) = c)|F 2 → V (v = average (N1(v)) ‖E4F 4

The first rule corresponds to the original stencil for face points. Using the secondrule, the old vertices are relocated (smoothed) using a modified stencil with thename CatmullClark. Finally, the edge points are computed with the third rule.

Notice that the same production rule is used for both the face points andedge points. It is invoked when a symbol E is encountered while processing thecurrent string. Each symbol E points to an actual edge e somewhere in the mesh(this pointer is actually the parameter of the module E). If the level of this edgeis equal to the current processing level c, the edge is rewritten to a vertex. Notethat the context of an edge is indicated by F 2, representing two faces25. Thenew vertex v is calculated using the stellar operator edge-split. It is created atthe midpoint of the edge, after which its position is immediately updated to theaverage of its one-ring neighbourhood N1(v) (see Figure 4.4). The context of thenewly inserted vertex are four edges and four faces: E4F 4.

The new vertex is assigned the level of the old edge +1. The four new edgesare assigned a level that equals the level of the old edge +2. One iteration ofthe scheme (including the pre-processing of the mesh to form the basis blocks)is illustrated in Figure 4.5.

c = 0 c = 1

1

1

1

1

1

1

0 0

0

00

0

2

2

2

2

2

2

2

2

1

1

1

1

1

1

1

1

1 0

0

0 0

0

00

0 1

0 0

0

00

0

2

2

2

2

2

2

2

2

1

1

2

2

2

2

2

2

2

3

3

3

3

33

3

3

3

3

3 3

3

33 3

333

3 33

Figure 4.5: Flow diagram of the pre-processing step and the refinement part(which is in fact a primal quadrilateral quadrisection (PQQ)). Levels of the edgesare indicated in orange, levels of the vertices in green. Note that an edge-splitoperation increases the processing level c by one.

A simple but important part of the method is that the new vertex positions(for existing vertices) are not directly assigned, but first saved in a buffer26.Newly calculated positions should indeed not be used for calculating other newpositions in the same step. After all new positions are determined, the newpositions are assigned. This is also the reason why the smoothing step is notincluded in Figure 4.5 (it takes place at c = 1, between the third and fourthdiagram).

25Note that if the edge would be positioned on the boundary of a mesh, its context wouldbe F instead of F 2. A very elegant way to distinguish different types of edges!

26Whether this is really necessary or not depends on the used variant of the Catmull-Clarkstencils, and the order of the production rules.

22

Page 26: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

An application of the Catmull-Clark scheme is illustrated in Figure 4.7.

Loop Since Loop subdivision can only be applied on triangle meshes, it doesnot need any special preparation (like the Catmull-Clark scheme does). Therefinement part of the scheme is accomplished with an edge-split operation andan edge-flip. Although the edge-split is applied to all edges, the result dependson which edge gets split first. The edge-flip operator is required to compensatethis. This is showed in Figure 4.627.

Figure 4.6: Primal triangle quadrisection (PTQ) using stellar operators. Alledges get split, and depending on the order, one edge per triangle (the orangeone) needs to be edge flipped.

The PTQ refinement (edge split followed by an edge flip) is accomplished bythe following two production rules:

E(e; level(e) = c)|F 2 → V (v = average(e))‖E4F 4

E(e; level(e) < c)|F 2 → E‖F 2

Subsequently, the smoothing step is realized by these two rules:

V (v; level(v) = c)→ V (v = LoopNew(v))

V (v; level(v) < c)→ V (v = LoopOld(v))

The LoopNew and LoopOld operations are the smoothing schemes for Loop sub-division. These modified stencils are derived in the paper.

Finally, it should be remarked that there are some minor inconsistenciesregarding the assignment of new levels. Although a general approach is givenin the paper, it cannot be applied to all schemes. This only becomes apparentwhen flow diagrams are created (like the one in Figure 4.5). In particular, therule for assigning levels regarding edge-splits and edge-flip seem inconsistent.Loop clearly requires the +1 rule for edge-flips, whereas the Doo-Sabin schememust use a +0 rule. Likewise, the rules for the edge-split operation seem incontradiction with, inter alia, the Catmull-Clark scheme. Attempts to set up abetter general approach were unsuccessful.

27Note the striking similarity between a PTQ refinement and an iteration of the SierpinskiL-system!

23

Page 27: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

Implementation The concept was implemented in Matlab using a half-edgedata structure (which is quite a stylish data structure providing easy access toneighbours) – both CGAL and OpenMesh include good implementations. Be-cause the approach decomposes the different schemes into standard operators, itis very simple to add a subdivision scheme to the program – just a few produc-tion rules accompanied by the relevant smoothing schemes (the modified stencils)does the trick. As a result, the eventual code supports all examples from thepaper: Kobbelt’s

√3 scheme, Loop, Catmull-Clark, Doo-Sabin, Midedge [PR97]

and the 4-8 scheme [VZ01]. Note that the (modified) Butterfly scheme [ZSS96]is not in this list: the stencils for this scheme use vertices outside of the one-ringneighbourhood. An example using the Catmull-Clark scheme is included, seeFigure 4.7.

Figure 4.7: The Catmull-Clark scheme in action. The leftmost structure is themesh as important from the file. Next is the triangulized28(pre-processed) mesh,consisting of basis blocks. Subsequent meshes represent a few iterations of thescheme.

4.2.3 Additional methods

Apart from Velho’s approach, there is one other method [SPS03] which is furtherdeveloped in [SMG10]. Although the notation is completely different, belowthe surface there are many similarities with Velho’s method. It is important torealize that this other method does not use L-systems to describe the subdivisionschemes. However, because of its resemblance to Velho’s scheme, we chose toinclude it in this report anyway.

In short, the method uses a graph rotation system to access the neighboursof vertices. Basically, this is just a graph with for each vertex an ordered listcontaining its neighbours (not unlike a half-edge mesh). Using these lists in aclever way, the polygonal interpretation of the graph can be obtained.

Next, it uses three types of operations – set operators, topological operatorsand geometric operators. These operators all interact with the mesh in their ownway29. Basically, the set operators are low level operators to add and remove

28An important observation is that the triangulized mesh normally results in a differentsubdivided mesh than the original mesh. However, when using these modified subdivisionrules, this is not the case.

29Note that the operators could result in intermediate steps that do not represent a validmesh.

24

Page 28: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

vertices. The topological operators are higher level operators – they can usequery, selection and editing operations on both the vertices and its associatedring of neighbours. Geometric operators are represented in the form of stencils.

Similar to Velho’s method, it uses a synchronizing system. Newly computedpositions of vertices (and their neighbourhoods) are stored – only after all newpositions are calculated, a synchronize operation is evoked.

Unlike Velho’s method, the paper includes some details on the implementa-tion. It works with vv, an extension to the C++ language. This extension pro-vides a more or less a declarative environment – the resulting code is extremelyreadable! Unfortunately, it uses a dynamically linked library (DLL), such that itis not trivial (perhaps even impossible) to run it on any other operation systemthan Microsoft Windows∗.

Another drawback of this method is that it seems to be less general. Whereasin the previous method it would be relatively easy to add support for boundaries,there is no mention of boundaries in this paper. It should be possible by usingthe rings of neighbours, but it is certainly not as trivial. Furthermore, for somereason the paper only includes examples of triangular subdivision schemes. Itshould be relatively easy to write a scheme like Catmull-Clark or Doo-Sabin withthe vv extension, but because of (∗) this could not be tested.

To conclude, this method is another elegant way of describing surface subdi-vision schemes. It is perhaps more intuitive than the half-edge mesh approach,but along with a few minor disadvantages it seems to lack the generality that ispresent in the previous method.

Recently a future research question from [SPS03] was studied in [SMG10].Instead of using simplicial complexes like Velho does, it uses cellular complexes(which are in fact not that different – they are just more general). With quitesome theoretical support it is illustrated that known surface subdivision schemescan be implemented in MGS, a language that is still under development. The paperincludes an elaborate explanation how to implement Loop’s scheme. Instructionson how to use MGS for other schemes are included in [Spi06].

5 Conclusion

After introducing the principles of Lindenmayer systems and B-splines, it isshown that these two topics can be combined quite well. Whereas in the uni-variate case, the context-sensitive approach is more generally applicable, thecontext-free method provides an interesting new way of knot-insertion. For thebivariate case, Velho’s approach seems to be the most general, although it is ac-companied by some minor peculiarities. The other approaches are more focusedon implementation, and are therefore more readily understood.

Looking at the publication dates of the discussed papers, it seems that theinterest in the conjunction of these two topics is on the rise. Interesting futureresearch has been proposed in most of the papers, some of it already being workedon. Hopefully this survey will be an inspiration and boost for future studies!

25

Page 29: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

References

[AS10] Lars-Erik Andersson and Neil F. Stewart. Introduction to the Math-ematics of Subdivision Surfaces. SIAM, 2010.

[CC78] E. Catmull and J. Clark. Recursively generated b-spline surfaces onarbitrary topological meshes. Computer-aided design, 1978.

[Cha74] G.M. Chaikin. An algorithm for high-speed curve generation. Com-puter graphics and image processing, 1974.

[Cox72] M.G. Cox. The numerical evaluation of b-splines. IMA Journal ofApplied Mathematics, 1972.

[dB72] Carl de Boor. On calculating with b-splines. Journal of Approxima-tion Theory, 1972.

[DS78] D. Doo and M. Sabin. Behaviour of recursive division surfaces nearextraordinary points. Computer-Aided Design, 1978.

[Ers02] Knut Arild Erstad. L-systems, twining plants, lisp. Master’s thesis,University of Bergen, 2002.

[Gol90] Ron Goldman. Blossoming and knot insertion algorithms for b-splinecurves. Computer Aided Geometric Design, 1990.

[Gol03] Ron Goldman. Pyramid Algorithms: A Dynamic Programming Ap-proach to Curves and Surfaces for Geometric Modeling. 2003.

[JKC+02] Herbert Jelinek, Audrey Karperien, David Cornforth, Roberto Mar-condes Cesar Junior, and Jorge de Jesus Gomes. Micromod - anl-systems approach to neuron modelling. 2002.

[Kob00] L. Kobbelt. 3-subdivision. Proceedings of the 27th annual conferenceon Computer graphics and interactive techniques, 2000.

[LG87] Tom Lyche and Ron Goldman. Knot Insertion and Deletion Algo-rithms for B-Spline Curves and Surfaces. SIAM, 1987.

[Lic99] W.B.R. Lickorish. Simplicial moves on complexes and manifolds.Geometry and Topology Monographs, 1999.

[LR80] J.M. Lane and R.F. Riesenfeld. A theoretical development for thecomputer generation and display of piecewise polynomial surfaces.IEEE Transactions Pattern Analysis and Machine Intelligence, 1980.

[Man06a] Stephen Mann. A Blossoming development of splines. Morgan &Claypool Publishers, 2006.

[Man06b] S. Manousakis. Musical l-systems. Master’s thesis, The Royal Con-servatory, The Hague, 2006.

[McC96] Jon McCormack. Grammar based music composition. ComplexityInternational, 1996.

[MP03] R. Mech and P. Prusinkiewicz. Generating subdivision curves withl-systems on a gpu. 2003.

26

Page 30: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

[NGOS12] Vincent Nivoliers, Cedric Gerot, Victor Ostromoukhov, and N.F.Stewart. L-system specification of knot-insertion rules for non-uniform b-spline subdivision. Computer Aided Geometric Design,2012.

[PBP02] Hartmut Prautzsch, Wolfgang Boehm, and Marco Paluszny. Bezierand B-Spline Techniques. Springer, 2002.

[PL90] Przemyslaw Prusinkiewicz and Aristid Lindenmayer. The algorithmicbeauty of plants. Springer, 1990.

[PR97] J. Peters and U. Reif. The simplest subdivision scheme for smoothingpolyhedra. ACM Transactions on Graphics, 1997.

[PR08] Jorg Peters and Ulrich Reif. Subdivision Surfaces. Springer, 2008.

[Pru86a] Przemyslaw Prusinkiewicz. Graphical applications of l-systems. Pro-ceedings of Graphis Interface, 1986.

[Pru86b] Przemyslaw Prusinkiewicz. Score generation with l-systems. Inter-national Computer Music Conference, 1986.

[PSS10] Przemyslaw Prusinkiewicz, Mitra Shirmohammadi, and FaramarzSamavati. L-systems in geometric modeling. 2010.

[PSSK03] Przemyslaw Prusinkiewicz, Faramarz Samavati, Colin Smith, and Ra-doslaw Karwowski. L-system description of subdivision curves. In-ternational Journal of Shape Modeling, 2003.

[PT97] Les A. Piegl and Wayne Tiller. The NURBS Book. Springer, 1997.

[Ram87] L.H. Ramshaw. Blossoming: A connect-the-dots approach to splines.1987.

[Rog00] David F. Rogers. An Introduction to NURBS: With Historical Per-spective. Morgan Kaufmann, 2000.

[Sab10] M. Sabin. Analysis and Design of Univariate Subdivision Schemes.Springer, 2010.

[Sal06] David Salomon. Curves and Surfaces for Computer Graphics.Springer, 2006.

[Sei89] H.P. Seidel. A new multiaffine approach to b-splines. Computer AidedGeometric Design, 1989.

[SG09] S. Schaefer and R. Goldman. Non-uniform subdivision for b-splinesof arbitrary degree. 2009.

[SMG10] Antoine Spicher, Olivier Michel, and Jean-Louis Giavitto. Declarativemesh subdivision using topological rewriting in mgs. 2010.

[Spi06] A Spicher. Transformation de collections topologiques de dimensionarbitraire. Application a la modelisation de systemes dynamiques.PhD thesis, Universite dEvry, 2006.

[SPS03] Colin Smith, Przemyslaw Prusinkiewicz, and Faramarz Samavati. Lo-cal specificatin of surface subdivision schemes. 2003.

27

Page 31: Describing subdivision schemes with Lindenmayer systems · 2 Lindenmayer systems Lindenmayer systems have a surprisingly widespread application. Although it was originally designed

[SVG07] S. Schaefer, E. Vouga, and R. Goldman. Nonlinear subdivisionthrough nonlinear averaging. Computer Aided Geometric Design,2007.

[SZSS98] T.W. Sederberg, J. Zheng, D. Sewell, and M. Sabin. Non-uniformrecursive subdivision surfaces. Proceedings of the 25th annual confer-ence on Computer graphics and interactive techniques, 1998.

[Vel00] Luiz Velho. Using semi-regular 48 meshes for subdivision surfaces.Journal of Graphics Tools, 2000.

[Vel03] Luiz Velho. Stellar subdivision grammars. Eurographics Symposiumon Geometry Processing, 2003.

[VZ01] L. Velho and D. Zorin. 48 subdivision. Computer Aided GeometricDesign, 2001.

[WW02] Joseph D. Warren and Henrik Weimer. Subdivision Methods for Geo-metric Design: A Constructive Approach. Morgan Kaufmann, 2002.

[ZSS96] D. Zorin, P. Schroder, and W. Sweldens. Interpolating subdivisionfor meshes with arbitrary topology. Proceedings of the 23rd annualconference on Computer graphics and interactive techniques, 1996.

28