Giter VIP home page Giter VIP logo

l-system's Introduction

L-System Generator

This program is a flexible implementation of a Lindenmayer System for generating fractal patterns, with a specific focus on tree-like structures. Although it's tailored to simulate natural arboreal forms, it can be adapted to create a wide range of fractal shapes.

Fractal tree

About the Project

The fascination with fractals' infinite complexity and their potential to mimic natural forms drove the development of this program. Starting from simple rules, the system recursively applies transformations to evolve complex tree-like structures or other fractal patterns, mimicking the natural growth patterns of plants and trees.

Built With

The project utilizes Python and leverages the Pygame library for graphical output, making it easy to run and accessible on any system with Python support.

  • Python Badge
  • Pygame Badge

Getting Started

Prerequisites

Ensure you have Python and Pygame installed on your machine. Python can be installed from python.org, and Pygame can be installed using pip:

pip install pygame

Installation

git clone https://github.com/Mixnikon108/L-System.git

Navigate to the project directory:

cd L-System

Usage

To run the program, execute the following command in the project directory:

python LSystem.py

This will open a window displaying the fractal tree. Parameters to modify are in the LSystem.py file. You can change axiom,rules, iterations,angle and l_system.calculate_points(units= <CHANGE_THIS_FOR_LENGTH>).

Gallery

Here are some examples of fractal trees generated by this tool. Some of the examples has been taken from Daniel John Jones website:

Rule Generated Tree Fractal
F[+X][-X]FX Fractal Tree 1
F[+X]F[-X]+X Fractal Tree 2
F[-F[-F++F]][+F[--F]]F Fractal Tree 3
F[-FF[+F]]F[+F[+F]] Fractal Tree 4

Contact

Jorge de la Rosa - @mixnikon Project Link: https://github.com/Mixnikon108/L-System.git

l-system's People

Contributors

mixnikon108 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.