Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.6 KB

README.md

File metadata and controls

47 lines (34 loc) · 1.6 KB

L-Systems

L-System engine written in C.

Examples

Image of the Dragon Curve Image of the Koch Curve Image of the Sierpinski Triangle GIF of a tree growing Image of a fractal plant Image of a tree

Configs can be found in the examples folder.

Compiling

To compile the project you will need SDL2 and SDL2_gfx installed and configured in pkg-config.

After that run

git clone https://github.com/Denloob/l-systems.git
cd l-systems
make

For more information please see the Makefile.

Running

After compiling, you can find the binary at ./bin/lSystem.

You can also use

make run

To both compile and run the L-system.

Using a Custom L-System

You can change/create L-systems by changing the functions in config.c.

The config_create function will create all the configuration for the L-system.

This config will later be passed to config_execute which executes the L-system described by the config and draws it.

After the function exits, config_destroy will be called to clean-up the memory used by the config.