3D L-Systems Programming Project

I only had about 2 weeks to program this from start to finish, after having designed it in about the most complicated way I knew how: classDiagram

It came together in the last 30 hours (non-stop)! Here’s the interface when you start it – it’s modular so you can customise the positions of the controls and log, use multi-monitor setups etc. Currently it only works on Linux.

startup

The program lets an artist create 3D L-Systems – self-similar branching structures – using recursive Production Rules applied to an Axiom. There are a few characters that affect the shape – move forward, turn, branch off etc, and other characters become variables that you can define.Screenshot

The live update means any time you change anything in the contents box, the whole system will be updated. This can cause the program to hang if you try to put iterations at 50 for example, but means the artist has instant feedback and can quickly learn the effect of the character he is changing or adding. You can watch the growth of the system with a slider, which is real-time even for complex structures.

growing

The program expands the rules a number of times (iterations) to get some text:Screenshot-8

The text above (note the scrollbar size) is for this structure:

Screenshot-6

The program, including source code, example files and instructions can be downloaded here: lsys.zip

Screenshot-10

I had planned to add obj export but never had time! Randomisation would also be a useful feature.Screenshot-2

All the OpenGL is core-profile, using VAOs, so drawing lots of lines is fast on most hardware.Screenshot-7Screenshot-9

Screenshot-1Screenshot-11

Advertisements

4 thoughts on “3D L-Systems Programming Project

  1. it’d take me forever to understand your class diagram but I love modularity in the interface 🙂 thumbs up for an overall impression of a serious application even without OBJ export! my gf convinced me to add another feature to my extension of the Ivy Generator before I add it to my showreel so when I finish I’ll give you a link too 😀 it’s a bit late but still happy Easter mate 🙂

    • Thanks! I’d love to see your program. I decided not to add any new features post-deadline, even though they are really necessary! Half the stuff in the design wasn’t implemented because I didn’t have time. Happy Easter!

  2. Thank you very much. It was great. I’m student. I need windows version of your L-sys program, can you help me…?

    • I’m afraid not. The ngl library I use for 3D transformations, vectors, shaders etc was not designed to work on windows. You could always download linux (probably 64 bit is best) (or run it in a virtualbox on windows), or if you’re a programmer, download the source and port it to a different engine/ OpenGL. I haven’t got time at the moment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s