An open API service indexing awesome lists of open source software.

https://github.com/dhanya-abhirami/kolam

Generates beautiful Kolam Pattern using L-Systems
https://github.com/dhanya-abhirami/kolam

fractal-geometry fractals grammar-rules lsystems p5js rangoli

Last synced: 5 months ago
JSON representation

Generates beautiful Kolam Pattern using L-Systems

Awesome Lists containing this project

README

          

[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

# Kolam ⌘
Kolam is a class of patterns drawn using lines, curves and dots. Made of rice flour or chalk, Kolams are a welcome sight in the courtyards of homes in South India.
## Lo Behold!
![alt tag](https://github.com/Dhanya-Abhirami/Kolam-Generator/blob/master/output.png)

## L-System
An L-system or Lindenmayer system is a parallel rewriting system and a type of formal grammar. An L-system consists of an alphabet of symbols that can be used to make strings, a collection of production rules that expand each symbol into some larger string of symbols, an initial "axiom" string from which to begin construction, and a mechanism for translating the generated strings into geometric structures.
L-systems differ from Chomsky grammars in that all variables are replaced in each step, and not just one. For example
```
Axiom (Initial State): G G
Production Rule: G -> g G G f
First Derivation: g G G f g G G f
Second Derivation: g g G G f g G G f f g g G G f g G G f f
```
## L-System Application
```
Variables: F,A,B
Axiom: FBFBFBFB
Rules:
A->AFBFA
B->AFBFBFBFA
```
Where,

SymbolMeaning
F Move forward 20 units
ADraw an arc of radius 20 units upto 90 degrees

B
Calculate forward units l = 10/sqrt (2)

Move forward l Units

Draw an arc of radius l units upto 270 degrees

Forward l Units


## References
[Wikipedia](https://en.wikipedia.org/wiki/L-system)

[Graphical modeling](http://algorithmicbotany.org/papers/abop/abop-ch1.pdf)

[Research Paper 1](https://www.researchgate.net/publication/295258996_A_View_of_India_Through_Kolam_Patterns_and_Their_Grammatical_Representation)

[Research Paper 2](https://www.semanticscholar.org/paper/Application-of-L-Systems-to-Algorithmic-Generation-Prusinkiewicz-Krithivasan/940ea81d742a5b8e690bce367ee4981bb6dbba60)

[Example 1](https://imaginary.org/film/mathlapse-l-system-for-single-knot-kolam-pattern-generation)

[Example 2](https://gist.github.com/jhubley/3cc23bf95bb5acaaad09152878a13d3b)

[Example 3](https://users.math.yale.edu/public_html/People/frame/Fractals/Panorama/Art/Kolams/Kolams.html)

## Lightning Talk
This project was presented at [PySangamam 2018](https://youtu.be/Gjgq2Ge05uA?t=397)

## Support Me!
* If you :heart: my project, please give it a :star: .
* Feel free to give me more grammars for Kolam generation