## Elise

### Instructions for Elise

A tool to create beautiful artwork based on the philosophy of Lindenmayer systems.

### Contents

Elise helps you to create beautiful stuff! Let her guide you through the freaky forest of discovery into the land of L-Systems.

This readme is a work in progress. If you want to extend it you are more than welcome to!

## General Description

The purpose of Elise is to help you play with, understand and design with Lindenmayer systems.

Tip: if text is shown `like this` you can use it in your rules and axiom.

### Introduction

Lindenmayer systems (or L-systems for short) are a kind of ‘formal language’ that can be used to create drawings. The method is based on an iterative process combined with a very simple language for describing a drawing. Letters in the language mean things like:

• Move forward one step, while drawing a line ( `F` )
• Move forward one step, but don’t draw a line ( `f` )
• Turn left by a fixed angle, but don’t walk ( `-` )
• Turn right by a fixed angle, but don’t walk ( `+` )
• and so on..

By combining these actions (represented by letters and other symbols) you can draw any shape you want. (`F+F+F+F` draws a square if we use 90 degree angles).

And here is where it gets really interesting, because you can transform these simple shapes into complex ones, using rules. Every rule represents a substitution. For example:

`F:F+F-F` (this is actually a variation on the Dragon Curve)

This means that every time we do an iteration, we substitute F+F-F for F. Say we take a single F as our first command. Let’s see this in action:

• Iteration 1

Command: `F`
• Iteration 2

Command: `F+F-F` (apply rule once more)
• Iteration 3

Command: `F+F-F+F+F-F-F+F-F`
• Iteration 4

Command: `F+F-F+F+F-F-F+F-F+F+F-F+F+F-F-F+F-F-F+F-F+F+F-F-F+F-F`

You can see, the drawing command becomes big quite fast. Every time we do an iteration, the number of lines we have to draw triples! So, watch out when ramping up those iterations, because you can make things quite hard for your computer very fast. That’s why you can see the calculation time in the application, so use it smartly!

### Drawing

The main purpose for Elise is to draw things on the screen. With her crayon, she can draw all kinds of lines and shapes for you, if you tell her to. You have seen the simples instruction in the introduction, `F`. If you use this, you draw can draw a simple straight line. Try it by filling in `F` in the Axiom textbox.

If you want to draw something else, try an Arc. Elise can draw beautiful arcs with the instructions `~` (draw an arc to the left) and ``` (draw an arc to the right).

But, this is not the only thing Elise can do. She can also fill her line drawings with color. To let here do that, use a combination of the commands `{`, `.` and `}`. With `{` you can tell Elise that she has to be ready to start drawing a filled shape. Every time she encounters a `.` , she will draw a dot on the floor at the place she’s standing and if she has already drawn a dot, she will connect the two. Then, if she has at least three dots, she starts filling in the space between the dots. Eventually, when you want her to finish drawing that shape, use the command `}`.

For example: if you set the angle to 90º and fill in the following in the Axiom field: `{.f+.f+.f+.f.}` Elise will draw a filled square. She gets the instruction to start drawing a filled shape ({) and draws a dot on the start position (.). Then, she walks a bit (f), rotates 90º, draws another dot, for four times. { makes her stop drawing the square. And there you go, your first filled square!

So can you draw her a hopskotch course?

Elise is still learning to draw other things, like pictures, but hasn’t mastered that quite yet. But as she keeps learning, she will eventually be able to draw lots of different things.

### Moving around

If you want to move around, but not draw a line, you can use `f` and `g`. These commands let you move around freely, without drawing any lines.

Another, very powerful way of moving around is to use Elises incredible memory. You can tell her to remember where she is standing and let her return to that position at a later moment. For this, use the symbols `[` (remember position) and `]` (go back to the last remembered position). This is incredibly useful if you want Elise to draw trees for example. Let’s see how we can make her draw a simple tree.

We use the following series of commands to let Elise draw a tree:

`F[F][+F][-F]`

With the first F, we just draw a simple line. The second F `[F]` is enclosed in brackets, so that means that we remember the place we are standing (`[`), draw a line (`F`) and go back to the place we just remembered (`]`). So, we are back in the spot we were just after we drew the first line. The third and fourth F’s are also enclosed in brackets, but before we draw them, we rotate left and right respectively. This means that we draw them with different angles relative to the second F, and so giving the illusion of a simple tree.

Combining this with our knowledge of rules, we can specify the following:

`F:F[F][-F][+F]`

so, every branch will get replaced by a copy of the whole tree. If you set the Axiom to `F` and the angle to 15º, you can see the tree growing when you increase the iterations slowly (remember, you will have lots of branches really quickly, so 6 iterations should give you a nice result already…)

These are one of the simplest, but also one of the most powerful commands that Elise knows. So, go on and experiment!

### Extensions

Besides the basic L-system commands, this application has a number of special extension that are specifically designed for the (graphic) designer. These include color manipulation, line manipulation, drawing polygons, arcs, and custom measurements.

All in all, enough to keep you playing for a while!

### Example files

If you got hold of this version of Elise, you should have gotten some example Elise files with it. These files contain simple to complex shapes that can be drawn using Elise. If you installed the program correctly, you should be able to open the files (extension: *.lsys) by double-clicking on them in your Explorer (Windows) or Finder (Mac). Usually, the system will load with only a few iterations. Increase the iterations slowly to see the system develop. Remeber, you can play with all the other properties of the system to your hearts content by turning and clicking all sliders and knobs.

## Creating Rules

Lindenmayer formulated a small set of symbols that have special meaning in the language. By combining these symbols, you can create rules. A rule forms a very simple structure:

`A:BCD`

This means that `A` gets substituted by `BCD` the next time we do an interation. You can create multiple rules, but they all have to follow the same structure. Use one symbol (like `F`, `A`, `~`, or even `+`) followed by a `:` (semicolon) followed by the contents of the rule. You can use all predefined symbols (descriptions below) instead of `A`, `B`, `C` or `D`. But, you can also you A,B,C,D or any other letter or symbol on your keyboard! (except for the space, because they are so hard to see…). Why is this useful? Well, if you want to create more complex shapes, you can group symbols together to get easier access to parts of your shape. Take a look at the Dragon Curve, and see if you understand what it does.

### Basic Commands

 F,G go forward & draw a line Take a crayon in your hand and draw a line on the ground of one floor tile long. f,g go forward Take a step forward and wait for further instructions. Rather boring, but it could be useful. + turn left Point your nose a number of degrees to the left. - turn right Point your nose a number of degrees to the right. [ save position Remember where you are, so that you can return to that spot if you want to. ] restore position Go back to the last spot you can remember. \$ reset angle Turn around so you face North. ! scale down The next time you draw a line, it will be a little bit shorter. @ scale up The next time you draw a line, it will be a little bit longer.

### Extensions

These are extensions to the basic language symbols.

#### Style

 v brightness down Make the next line a little darker V brightness up Make the next line a little lighter c hue down Change the color of the next line slightly in one direction. C hue up Change the color of the next line slightly in the other direction. s saturation down Remove some color from the next line. S saturation up Add some more color to the next line. \ line thickness down Make the next line a little thinner. / line thickness up Make the next line a little thicker.

#### Polygons

 { Start polygon } end polygon . add polygon point

#### Arcs (experimental)

 ~ draw arc right ` draw arc left

And, don’t forget: you can use any other symbol on your keybord too to form rules. These can be very handy as placeholders for larger structures.

### Arguments

If you don’t want to use predefined values for things like line length and rotation angle, you can define your own right after a symbol. Most of the symbols above can accept arguments (if you don’t use one, it uses the standard value). For example, to draw a line twice as long as a normal one, use:

`F(2)`

Or an angle that will always be 90 degrees:

`+(90)`

## Interface

We have tried to keep the interface as clean as possible, so you can focus on creating beautiful artwork.

• New – creates a new L-system (starts with a simple Koch curve)
• Open… – open a system from a file (*.lsys or even *.svg files)
• Save – Save a system to a *.lsys file on your computer
• Save to SVG – Save a version of the system that you can directly use in a vector editing application
• Instructions – gives you a cheat sheet with all the predefined instructions
• About – view this document

### Windows

• Commands Window
Lets you define the working of the system.
• Rules can be entered in the larger field (it will get bigger to allow you to add aditional rules by pressing Return at the end of the last rule.)
• Control Window
Change all the parameters of the system here. You can change:
• number of iterations
• default rotation angle (used with `+`, `-`, `~` and ```)
• line length scaling (used with `!` and `@`)
• default line color
• default line thickness
• speed
• Information Window
Gives you info on the time it takes to draw the system, export and the number of lines you see on the screen.

## Exporting

The tool provides the option of exporting to SVG. This functionality is still in a very early stage, but most commands will work (except for drawing polygons). However, we know that exporting is a very important feature, so we will continually keep extending SVG support.

SVG is an open standard to describe vector images and is supported by a wide range of graphic design applications. You can open SVG files with, amongst others:

### Issues

• All graphics will be scaled to fit into a square of 200mm x 200mm. They might not appear in the middle of the canvas, but on the top left.
• No support for drawing polygons yet
• Will be able to import SVG files that have been created with Elise as well
• If too much lines have to be drawn, the SVG file can get corrupted.
• Sloooow. Should be way faster with a bit of optimization.

## Ideas for improvement

### Fixes and essential features

• Zooming and panning interface functionality
• clearer interface (new style)
• exporting Polygons to SVG
• Updated help with tutorials
• directly open SVG with l-system metadata

### New functionality ideas

• Animation options.
• full-screen option for presenting
• exporting to AVI or animated SVG (is this supported anywhere anyway?)
• using images next to lines and polygons for rendering. (PNG, JPG, SVG)
• make it 3D
• use a graphical method for creating rules

## Disclaimer

Please understand that this is alpha software, and not ready for distribution yet. Therefore, I cannot be held responsible for any kind of damage to your computer (any hang or lost data, potential frustration about this fact and any kind of physical violence as a result…)

So, until better tested, TRY AT YOUR OWN RISK!

This version may not yet be used for commercial purposes. If you want to use it for your project, drop the author a line and we can work someting out.

© 2007 – 2009 by Studio Ludens V.O.F.

## Bibliography

• Prusinkiewicz, Przemyslaw; Lindenmayer, Aristid (1990). The Algorithmic Beauty of Plants. Springer-Verlag. pp. 101–107. ISBN 978-0387972978. download: http://algorithmicbotany.org/papers/#webdocs.

## Update History

• version 0.3.4 alpha – August 27, 2009
• some more interface bugfixes and improvements
• version 0.3.3 alpha – August 25, 2009
• new name!! this tool is now called Elise, a phonetic variation on l-sys
• interface is waaayy more cure
• application icon of a redheaded girl with a flower in her hair (made with L-systems of course)
• fixed bug where the app would not install on Vista.
• Seperate window with simple usage instructions
• version 0.3.1 – 0.3.2 alpha- August 24, 2009
• inbetween versions with bugfixes
• version 0.3.0 alpha – August 23, 2009
• new SVG export operational, line color doesn’t work yet
• moved SVG functions to a new class
• version 0.2.2 alpha – August 20, 2009
• More interface tweaks
• new implementation of the SVG rendering engine
• version 0.2.1 alpha – August 18, 2009
• Tweaked the interface, removed a wrong command description
• Removed a couple of small bugs