Skip to content
Ecce Signum

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • 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·
9 Apr

Yeah, that would have been a totally different movie.

Alex de Campi@alexdecampi

Clockwork Orange, hat test, 1971

Reply on Twitter 1380494051548487681Retweet on Twitter 1380494051548487681Like on Twitter 1380494051548487681Twitter 1380494051548487681
JohnWinkelmanJohn Winkelman@JohnWinkelman·
9 Apr

5 of 5 stars to How to Be an Antiracist by Ibram X. Kendi https://www.goodreads.com/review/show?id=3914846425

Reply on Twitter 1380333038945591296Retweet on Twitter 1380333038945591296Like on Twitter 1380333038945591296Twitter 1380333038945591296
JohnWinkelmanJohn Winkelman@JohnWinkelman·
5 Apr

4 of 5 stars to How to Dress a Fish by Abigail Chabitnoy https://www.goodreads.com/review/show?id=3922597309

Reply on Twitter 1379031329006833664Retweet on Twitter 1379031329006833664Like on Twitter 13790313290068336641Twitter 1379031329006833664
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

© 2021 Ecce Signum

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