#LSystem

Alexandre B A Villares 🐍villares@ciberlandia.pt
2025-04-30
Alexandre B A Villares 🐍villares@ciberlandia.pt
2025-04-18

"Lindenmayer Systems, Fractals, and Plants" (PRUSINKIEWICZ; HANAN, 1989) link.springer.com/book/10.1007

#LSystem #Fractals #Mandelbrot #ComputationalBiology

Preface
 
L-systems are a mathematical formalism which was proposed by Aristid Lindenmayer in 1968 as a foundation for an axiomatic theory of development. The notion promptly attracted the attention of computer scientists, who investigated L-systems from the viewpoint of formal language theory. This theoretical line of research was pursued very actively in the seventies, resulting in over one thousand publications. A different research direction was taken in 1984 by Alvy Ray Smith, who proposed L-systems as a tool for synthesizing realistic images of plants and pointed out the relationship between L-systems and the concept of fractals introduced by Benoit Mandelbrot. The work by Smith inspired our studies of the application of L-systems to computer graphics. Originally, we were interested in two problems:
  • Can L-systems be used as a realistic model of plant species found in nature?
  • Can L-systems be applied to generate images of a wide class of fractals? 
 
It turned out that both questions had affirmative answers. Subsequently we found that L-systems could be applied to other areas, such as the generation of tilings, reproduction of a geometric art form from East India, and synthesis of musical scores based on an interpretation of fractals. This book collects our results related to the graphical applications of 1systems. It is a corrected version of the notes which we prepared for the ACM SIGGRAPH '88 course on fractals. [...]
Alexandre B A Villares 🐍villares@ciberlandia.pt
2025-04-03

@liaizon thank you!

If you are curious, I added some references about L-Systems to this post: github.com/py5coding/py5genera

#Processing #CreativeCoding #Python #py5 #LSystem

Alexis Pierreversatiledesign
2025-04-02

/ work in progress / a variable grid system for pixel placement. Mostly ready to hold , and patterns.
Each pattern is fed and feeds the other based on 1 and 0 sides sequences when available.

Alexis Pierreversatiledesign
2025-03-21

plotted with my class on Let's now explore some incredible

Alexis Pierreversatiledesign
2025-03-20

What is my trying to tell me ?

Spektrum (inoffiziell)spektrum@anonsys.net
2023-12-24
Mathematisch lassen sich komplexe Phänomene oft unerwartet einfach beschreiben. Doch hinter dieser Einfachheit verbergen sich überraschend vielfältige Welten.#KochscheSchneeflocke #Fraktal #Freistetter #FreistettersFormelwelt #AristidLindenmayer #L-System #Mathematik
Freistetters Formelwelt: Die komplexeste Schneeflocke der Welt
Alexandre B A Villares 🐍villares@ciberlandia.pt
2023-12-12

Na moral, um #LSystem em 35 linhas é elegante demais, Processing + Python == <3

Alexandre B A Villaresvillares@pynews.com.br
2023-11-15

regras = {
'X': 'F+[![X]-X!]-F[-FX]+X',
'F': 'FGF',
}
axioma = 'X'
iteracoes = 6
angulo = 25

#LSystem #Processing #Python #py5

# L-System  like a plant made with the code below
regras = {
    'X': 'F+[![X]-X!]-F[-FX]+X',
    'F': 'FGF',
    }
axioma = 'X'
iteracoes = 6
angulo = 25
tamanho = 2

def setup():
    global nova_frase
    size(800, 800)
    frase_inicial = axioma
    for n in range(iteracoes):  # repete 7 vezes
        nova_frase = ''
        for simbolo in frase_inicial:
            nova_frase = nova_frase + regras.get(simbolo, simbolo)
        frase_inicial = nova_frase
        print(len(nova_frase))
    
    
def draw():
    global angulo
    background(200, 240, 240)
    translate(400, 700)
    for simbolo in nova_frase:
        if simbolo == 'F':
            stroke_weight(1)
            stroke(0)  # traço preto
            line(0, 0, 0,-tamanho)
            translate(0,-tamanho)
        elif simbolo == 'G':
            translate(0,-tamanho)
        elif simbolo == '+':
            rotate(radians(-angulo))
        elif simbolo == '-':
            rotate(radians(angulo))
        elif simbolo == '!':
            angulo = -angulo
        elif simbolo == '[':
            push_matrix()
        elif simbolo == ']':
            pop_matrix()
        elif simbolo == 'X':
            stroke_weight(tamanho)
            stroke(255, 0 , 0)  # RGB
            point(0, 0)
Alexandre B A Villares 🐍villares@ciberlandia.pt
2023-11-14

Foi massa hoje fazer #LSystem com #py5 (#Processing + #Python) do zero no #Sesc. Dá para acompanhar mais ou menos a sequência que fizemos, e ver o código em hackmd.io/@villares/sesc-simul

cc @ericof

"""
desenho que parece uma planta com elementos auto-similares (lembra um fractal) feito com o código abaixo
"""

regras = {
    'X': 'F+[[X]-X]-F[-FX]+X',
    'F': 'FF',
    }
axioma = 'X'
iteracoes = 7
angulo = 25
tamanho = 2

def setup():
    size(800, 800)
    frase_inicial = axioma
    for n in range(iteracoes):  # repete 7 vezes
        nova_frase = ''
        for simbolo in frase_inicial:
            nova_frase = nova_frase + regras.get(simbolo, simbolo)
        frase_inicial = nova_frase
        print(len(nova_frase))
    
    translate(300, 700)
    for simbolo in nova_frase:
        if simbolo == 'F':
            line(0, 0, 0, -tamanho)
            translate(0,-tamanho)
        elif simbolo == '+':
            rotate(radians(-angulo))
        elif simbolo == '-':
            rotate(radians(angulo))
        elif simbolo == '[':
            push_matrix()
        elif simbolo == ']':
            pop_matrix()
Alexandre B A Villares 🐍villares@ciberlandia.pt
2023-11-13

Quem estiver em #SãoPaulo 14/11, e tiver o privilégio de um par de horas livres à tarde 14h30, vou dar uma atividade com #py5 #Processing + #Python lá no #SescAvPaulista. 14/11 vai ser #LSystem :)

sescsp.org.br/programacao/simu

Alexandre B A Villaresvillares@pynews.com.br
2023-10-08

axiom = 'X'
rules = {
'X': '[-X][+X][+FX]-FXB',
'F': 'FF',
}
angle = 25 # degrees
iterations = 6
# F -> forward step
# B -> blue circle
github.com/villares/sketch-a-d
#Processing #LSystem #Python #py5

An L-System plant-like structure that resembles a bush with blue circles
Alexandre B A Villares 🐍villares@ciberlandia.pt
2023-07-10

So, if your #Python team needs some #TeamBuilding "creative" activities, and your firm has a budget for that, you can call me to teach some terrible coding stuff, like how to create plant-like self-similar shapes with #LSystem (en.wikipedia.org/wiki/L-system). Or maybe some #PerlinNoise textures? There is no better way of spending corporate money than contracting me to show dubious graphics code that is almost impossible to test! Don't waste this opportunity!

Alexandre B A Villares 🐍villares@ciberlandia.pt
2023-01-09

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst