An Approach for River Delta Generation Using L-Systems

Luis Oswaldo Valencia-Rosado and Oleg Starostenko

### Abstract

The generation of river deltas is an open problem within the area of procedural terrain generation; there is not much research to automatically generate this type of feature. A river delta is a branching structure that is formed when rivers reach calm water bodies such as the ocean or lakes; depending on the characteristics, they can be classified as dominated by the tides, the waves, or the river itself. Lindenmayer systems or L-systems are grammars capable of generating natural-looking branching structures, such as vegetation; for this reason, an adaptation of these systems is proposed for generating branching river skeletons. The strings generated by the L-system are graphically interpreted using turtle graphics. This approach proves to be useful for generating skeletons of deltas dominated by the tide or the river. The results presented in this chapter are preliminary since this is a work in progress.

Keywords: procedural terrain generation, Lindenmayer system, branching river, skeleton generation

## 1. Introduction

Automatic terrain generation is a technique where a computer system generates virtual environments with as few as possible human interaction. This has been an active topic for several years and has become more prominent as production costs have risen steadily in video game production especially since high-definition graphics became standard [1]. Terrain generation techniques have evolved through the years focusing on improving realism [2, 3] or having real-time generation [4, 5]; nevertheless, most works focus in generating a few terrain features, being the most prominent the generation of mountains and rivers, while the creation of other features, such as river deltas, is an open area for research.

In nature, a delta is formed when a river leads into a bigger and mostly stagnant water body, such as a lake or the ocean. The sediments carried by the river are deposited as the river speed decreases and the river cannot carry them anymore. These deposits form new land and provoke the division of the river into smaller branches called distributaries. The deltas can be classified depending on the influence of tides, waves, and the river itself [6]. As can be observed in Figure 1, the shape of many of these deltas resembles other branching shapes found in nature such as trees, bushes, or corals; therefore, a technique used for the generation of branching structures could be adapted and used to generate the skeletons of river deltas. Lindenmayer systems or L-systems are a grammar-based technique that has been used for generating plant structures among other types of shapes [7].

Based on the analysis of the different methods first, a string of symbols is generated using L-systems. Afterward, these symbols are used as instructions to provide a graphic interpretation. For this implementation, turtle graphics are used. In the upcoming sections, both the L-systems and the turtle graphics will be

These systems are formal grammars with parallel rewriting that were originally designed to describe plant growth. The grammar G is formed by an alphabet V which contains the symbols that can be used, an initial state ω called axiom, and a

Symbols are put together to form words. The set of words that can be generated by the system is denoted by V\*; the axiom could be a symbol or a word. The generation rules are applied to a symbol α, and the result is a word χ which is called the successor; in the case where there are no generation rules for a symbol α, the symbol is repeated as is when rewriting the strings. The rewriting occurs for each character in order; this produces a new word. The rewriting process is repeated for an arbitrary number of iterations. In this chapter, the used systems are deterministic, which means that each character could have only one rule at most; therefore, when having the same parameters, the results are the

This is a vector method that uses a cursor over a Cartesian plane, the cursor has an (x, y) position and a current angle θ. There is a step size r. The next position of

line between the current and the next position. The next position then becomes the current position. For this implementation, the width and length of the line remain

in angle β which will be added or subtracted to the current angle, the step size r which represents the line length, and a number i of iterations which controls how

The symbols used for this implementation, and their respective graphic inter-

F Of forward, a straight line is drawn between two points

+ The angle β is added to the current angle θ

� The angle β is subtracted from the current angle θ [ The current position and angle are saved into a list ] The last position and angle saved in the list are taken L, R, S, X Transition symbols with no graphic interpretation

) where x<sup>0</sup> = r \* cos θ and y<sup>0</sup> = r \* sin θ. The cursor draws a

, y 0

), initial angle θ<sup>0</sup>

, a change

finite set of generation rules P; this is G ¼ ð Þ V, ω, P .

An Approach for River Delta Generation Using L-Systems

DOI: http://dx.doi.org/10.5772/intechopen.90099

, y0

The needed parameters are the initial position (x<sup>0</sup>

many times the L-system rewriting will be performed.

Symbol Interpretation

L-system symbols and their turtle graphic interpretation.

explained.

3. L-systems

same for every execution [7].

4. Turtle graphics

the cursor is given by (x<sup>0</sup>

pretation, are presented in Table 1.

constant.

Table 1.

125

#### Figure 1.

Satellite images of river deltas from NASA GloVis database [8]. (a) Mississippi River and (b) Fly River.

A method for generating skeletons that resemble delta shapes is presented; it is based on L-systems and turtle graphics. In the following sections, there will be a brief exposition of previous works that generate river deltas, an explanation about L-systems and how they were adapted for generating delta skeletons, the presentation of graphic results and their discussion, and finally, the conclusions and future research work.
