POV-Ray : Newsgroups : povray.advanced-users : An idea about plant growth with a L-System and the mesh-camera : Re: An idea about plant growth with a L-System and the mesh-camera Server Time
28 Sep 2024 12:59:31 EDT (-0400)
  Re: An idea about plant growth with a L-System and the mesh-camera  
From: Paolo Gibellini
Date: 15 Jan 2013 07:35:38
Message: <50f54d1a$1@news.povray.org>
>MichaelJF  on date 14/01/2013 20.35 wrote:
> Hi Paolo,
>
> tonight I found the time to look at your code finally. I think it is a good
> starting point for my purposes. I never would have came up with the simple idea
> to store the left and the right hand side of the productions into corresponding
> arrays. This gives room for improvement. I think it is possible to extend your
> str_pos and str_replace macros to accept strings for the parameter "caraterre"
> which would make simple context-sensitive grammars possible. Since I need an
> extension into the third dimension and a so called "open parameter" (to
> determine the next direction with the mesh cam), which is handled between every
> iteration of your parse_string macro with additional code, I propose to leave
> the changes to me (since I'm not very good in explaining my ideas to others).
> But I thank you very much for the code and your kind offer.
>
>
> Best regards,
> Michael
>
>
>
It is an old work but I'm fascinated by L-Systems and I'm glad that the 
code can be reused.
I've translated in English the names of the variables and added a couple 
of comments. You can find the updated source in p.b.s.

Regarding the 3-d extension, there is an example here:
http://math.stackexchange.com/questions/123642/representing-a-3d-hilbert-curve-as-an-l-system
In the example they introduced Yaw, Pitch and Roll.

Hope it helps,
;-)
    Paolo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.