Lexa

WPF, C#, Objective C and a little Math

Archive for the ‘L-Systems’ Category

Fast L-System rendering with OpenGL

Main news: WPF 3d renderer in the Viewer is replaced with OpenGL renderer (using OpenTK library). Now rendering is really fast. I didn’t do anything special: when L-System symbols string is parsed, all elements are collected in a huge array of vertexes, colors and normals, which is then rendered using glDrawArrays function. The other interesting […]

Bush!

Todays update: Push command of the Turtle not only pushes position, but also thickness and color, Pop command restores them. And here are some results – improved Flower and Bush (with “realistic” thickness of the stem!):

Flowers with L-System

Today I added filled polygons (called Surfaces) in L-Systems, so now it is possible to define some polygonal stuff, i.e. flowers. Next example is based on flower system from the book (figure 1.26), but with some modifications: Viewer application was extended – now it is possible to check every build iteration of selected L-System (called […]

The Book

I just received the original “The Algorithmic Beauty of Plants” which I bought for 25 euros on the Amazon. The book is in A4 format and has a hard cover. Its just great to have it, I love books 🙂

Cutting module in LSystems

Cutting is now in the library. It is used to simulate shedding of plant parts, i.e. palm trees. The idea of shedding is the following: if cut symbol (module) is in the string, then all following symbols in current branch are skipped, i.e. R, StartBranch, F, Cut, F, L, EndBranch is transformed into R, StartBranch, […]

3d L-Systems rendering using WPF Viewport3D

Wow! Its 3d now! ITurtle interface was extended with Pitch and Roll commands, and now it is possible to define L-Systems in 3d. Its the very first implementation, and UI is a bit ugly – I just created 2 tabs – “3d” and “2d”, so both views can be used for the selected System. The […]

LSystems 2d Viewer

Latest project update includes 2d Viewer – it uses turtle graphics to render L-System (implementation is based on my previous post). Viewer includes 2 examples – Tree (taken from L+C description) and Leaf. Some changes were done in LSystems to be able to render 2d: * Introduced Turtle namespace containing everything needed for turtle rendering, […]

LSystems in google code

After some reading of official documentation for “L+C” (this one), I made some changes in LSystems lib, including: DecompositionAttribute – to declare simple context free productions. IgnoreAttribute – to ignore modules in source string when applying production rule. Special handling of StartBranch and EndBranch modules when matching left or right predecessors. Project source code is […]

Context sensitive parametric L-systems framework in C#

Subject of this post is a small C# library, which can be used to: – define L-System and Modules as C# classes, – create and use L-System using these definitions. I was inspired by “L+C” language (see official page of L+C for details), but in contrast to “L+C” I wanted to use only native language […]

L-Systems and Turtle Graphics in C# and WPF

I’m currently interested in L-Systems and how to generate content using them. WPF and .Net provides nice tools to create an application which I am going to use to my experiments. It is similar to Online experiments with L-Systems using JSXGraph but more “realtime”. Simple context-free, non-parametrized L-Systems are supported. And this is how the […]