Code Monkey home page Code Monkey logo

lindenmayer's Introduction

Lindenmayer

Build Platforms Swift 5.5 License Twitter

The package provides a library you can expand upon to develop your own Lindenmayer systems, directly in the Swift programming language. While the package includes a number example L-systems, the primary intent is to allow you to create L-systems with rules and modules that you define. This implementation provides support for context sensitive, and parametric grammars when creating your L-system.

The library provides 2D and 3D representation rendering of a current L-system states, including some SwiftUI views that you can use to display either 2D or 3D results:

The repository has Discussions enabled if you have questions, as well as issues logged for planned improvements.

Contributions are welcome - as discussion, feedback, questions, or code.

Inspiration

A combination of influences led to this development, initial as an experiment and general exploration. One part was the lindenmayer swift playground by @henrinormak, which implements a great single-character representation which is perfect for exploring fractal systems. That, in turn, was built on the work of Aristid Lindenmayer in the book The Algorithmic Beauty of Plants. The research that Aristid Lindenmayer started continues to be expanded by Professor Przemyslaw Prusinkiewicz with generous publications of research papers on the site Algorithmic Botany.

A couple of the papers expand on the tooling to create and evaluate L-systems, and their advances allow for interesting new capabilities to be expressed in the L-systems:

The features that I was most interested in leveraging:

  • Parameters within an L-system's modules and exposing them to grammar evaluation and production choices (parametric L-systems).
  • The introduction of random values with those parameters (stochastic grammars).

While this project can be implemented using an interpreter, I wanted to see how far I could leverage the Swift language. This project attempts to follow in the conceptual footsteps of the L+C language to create a mechanism to create L-systems that compile down to machine code for efficiency of execution.

lindenmayer's People

Contributors

heckj avatar

Stargazers

 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.