Skip to content

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • Indexes
  • Laboratory

L-System Basics: Drawing a Line

2011-01-31 John Winkelman

This post is meant to provide some basic instructions and simple starting points for using the Lindenmayer System Explorer. Most of what is written here can also be used in other such tools.

Clicking on an image will open the L-System Explorer pre-loaded with the rules set which created that image.

At its simplest, a Lindenmayer system can be used to generate a line.

Play around with line length, iterations, and the number of “F”s in the Start Condition and the Grammar. You should end up with straight lines of varying lengths

Seems like a lot of work just to draw a straight line. Now add a “+” to the Grammar, changing it to this: F:F+FF

Assuming you have not changed any of the other values, you should have a shape which looks like this:

When going through the rule set, every time a “+” is encountered, the drawing tool changes the angle of the next line by the value in the “Angle” field.

Now add a “-” (minus sign) to the Grammar, changing it to this: F:F+F-F. This should give you a much more complex line which looks like this:

Now change the grammar so that it looks like this: F:F+F-F-F+F. Assuming you haven’t changed any of the other values, you see this pattern:

Adjust the Iterations for this one and you will see how a few simple rules can rapidly generate remarkably complex patterns. Here is the previous rule set with four iterations…

…and with five iterations.

Posted in ProgrammingTagged Flash, Lindenmayer, procedural art

Post navigation

L-system Explorer Update:Bookmarking
L-System Basics: Angles

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Personal website of
John Winkelman

John Winkelman in a diner in San Francisco

Archives

Categories

Posts By Month

January 2011
S M T W T F S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
« Sep   Feb »

Twitter Feed

JohnWinkelmanJohn Winkelman@JohnWinkelman·
11h

4 of 5 stars to Dream or Nightmare by Stephen Duncombe https://www.goodreads.com/review/show?id=4733886574

Reply on Twitter 1529265591478956032Retweet on Twitter 1529265591478956032Like on Twitter 1529265591478956032Twitter 1529265591478956032
Retweet on TwitterJohn Winkelman Retweeted
JordanrosenfeldJordan Rosenfeld@Jordanrosenfeld·
21 May

Don't like "Show, don't tell?" Try: "Demonstrate, don't lecture." Characters use words & deeds. #writetip #characters #scenes

Reply on Twitter 1528089044319617024Retweet on Twitter 15280890443196170241Like on Twitter 15280890443196170241Twitter 1528089044319617024
Retweet on TwitterJohn Winkelman Retweeted
The_Lady_RedThe Lady Red- the night is dark and full of terror@The_Lady_Red·
20 May

@notcapnamerica

Reply on Twitter 1527768341934272512Retweet on Twitter 1527768341934272512138Like on Twitter 1527768341934272512829Twitter 1527768341934272512
Load More...

Links of Note

Reading, Writing
Tor.com
Locus Online
The Believer
File 770
IWSG

Watching, Listening
WYCE Electric Poetry
Writing Excuses Podcast
Our Opinions Are Correct

News, Politics, Economics
Naked Capitalism
Crooked Timber

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

© 2022 Ecce Signum

Proudly powered by WordPress | Theme: x-blog by wpthemespace.com