POV-Ray : Newsgroups : povray.general : Simple L-system library for POV-Ray v3.7 Server Time
27 Jul 2024 12:35:55 EDT (-0400)
  Simple L-system library for POV-Ray v3.7 (Message 10 to 19 of 29)  
<<< Previous 9 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Tor Olav Kristensen
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 19 Jul 2023 22:55:00
Message: <web.64b8a0b8753f6159a909f4889db30a9@news.povray.org>
"Droj" <803### [at] drojde> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
>
> Hi TOK,
> >
> > Thank you Droj. It was an interesting challenge to make this.
> >
>
> I suppose it was more than one weekend's work.
>
> > That's indeed a nice L-system tree. I think I like it more than the one PB made.
> >
> Thank you so much. Sometimes coding morons like me have their bright moments.
>
> > Is it this axiom and rule that you had to adapt ?
> >
> >   axiom = FX
> >   X -> >[-FX]+FX
> >   angle = 40
> >
> Yes, this was the one. I had to scratch my head more than once when I used it.
> It couldn't be symmetric and an angle of 40 could not be right.
> I usually trust PB a lot but I guess something went wrong during publishing...
>
> > If so, then I've shown how this can be used without much adaptation in a new
> > example in the repository.
>
> I definitely support the idea. We are still scratching on the surface of what
> L-System is capable of.

Yes, you are probably right. - But first I'm curious about what has already been
done with L-systems.

I don't know if this reprint (or new edition ?) "The Fractal Geometry of Nature"
book by Mandelbrot contains any L-system images/rules:

https://www.amazon.com/Fractal-Geometry-Nature-Benoit-Mandelbrot/dp/1648370403

If so then I'll have to consider buying it.


> But do you think you still have the energy and the time to lift that baby from
> 2D to 3D?
> Think of the 2D Hilbert curve and imagine how it would look in 3D.
> I usually say it looks like the mad plummer struck again. But should we get
> there I would die happily.
> Gilles Tran published something like that but it is more than weird.

Yes, I remember his crazy plumbing work. Very fascinating. I really miss his
wonderful art in here.

When I replaced macros with functions in my L-system library I tried to make it
so that 3D functionality could be added later without much redesign.

But I'm not sure how the rules should work in 3D. Have you seen any such
images with accompanying 3D rules? If so, that would help me understand what is
needed.


> > Please post some more images made with the axioms and rules that you've
> > collected.
> >
> Of course I will but to be adequate to your examples I have to dig deep, bite my
> fingernails and scratch my head a lot more.

No worries. I'll add a Hilbert curve example as you suggested.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 19 Jul 2023 23:00:00
Message: <web.64b8a2b1753f6159a909f4889db30a9@news.povray.org>
"ingo" <nomail@nomail> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
>
> > [...] I started to
> > rewrite his L-system code to work in POV-Ray v3.7.
> >
>
> I already started wondering about the silence from Norway, but then, as Jack out
> of the box, there is beautiful code. Thank you Tor Olav.

Hi Ingo  :-)

I'm just lurking around in the background. I do not have as much time for
POV-Ray code writing as I once had.

Lately I've been working, slowly, on these two projects - which are not finished
yet:

https://github.com/t-o-k/POV-Ray-matrices
https://github.com/t-o-k/Predynastic-Egyptian-granite-vase

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 19 Jul 2023 23:05:00
Message: <web.64b8a3dc753f6159a909f4889db30a9@news.povray.org>
"Colin Fleming" <Colin Fleming> wrote:
>...

> Hi Tor,
>
> This is great work!

Thank you Colin


> Przemyslaw Prusinkiewiczs book, "The Algorithmic Beauty of Plants" was one of
> the first books I bought on L-Systems.
>
> If anyone is interested, you can download the book here:
>
> http://algorithmicbotany.org/papers/abop/abop.pdf


Thank you for that link. I did not know that it is freely available.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 19 Jul 2023 23:20:00
Message: <web.64b8a6ce753f6159a909f4889db30a9@news.povray.org>
"Droj" <803### [at] drojde> wrote:
> "Droj" <803### [at] drojde> wrote:
>
> > >
> > >   axiom = FX
> > >   X -> >[-FX]+FX
> > >   angle = 40
> > >
> > Yes, this was the one. I had to scratch my head more than once when I used it.
> > It couldn't be symmetric and an angle of 40 could not be right.
> > I usually trust PB a lot but I guess something went wrong during publishing...
> >
>
> Have to correct myself.
> It took some time to figure out how it works but it is symmetric and the angle
> is acceptable, too.
> But his rule means branches grow (>) with each iteration instead getting smaller
> (<).

Those rules can be a bit confusing.

If the scale number is greater than 1, then > will increase the line width and <
will decrease it. And if it is less than 1 the opposite will happen.

It seemed that P.B. had used the golden ratio for the branch width scaling:

phi = (1 + sqrt(5))/2 = 1.618033988749...

So to make the branch radii decrease by their "distance" from the stem when
using the > symbol, I used the reciprocal of phi, i.e. 1/phi = 0.61803398875...

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Droj
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 21 Jul 2023 17:30:00
Message: <web.64baf7f4753f6154915286f3b2af915@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:

>
> I don't know if this reprint (or new edition ?) "The Fractal Geometry of Nature"
> book by Mandelbrot contains any L-system images/rules:
>
> https://www.amazon.com/Fractal-Geometry-Nature-Benoit-Mandelbrot/dp/1648370403
>
> If so then I'll have to consider buying it.
>

I think the 'The Algorithmic Beauty of Plants'
(http://algorithmicbotany.org/papers/abop/abop.pdf) is a more up-to-date version
of L-Systems.

>
> But I'm not sure how the rules should work in 3D. Have you seen any such
> images with accompanying 3D rules? If so, that would help me understand what is
> needed.
>

It's not too much. 2 symbols for pitch up/pitch down and 2 symbols for roll
left/roll right. And some 'placeholder' chars like A,B,...
See chapter 1.5 in the book I mentioned above.

There is also an axiom and rule for the famous Hilbert curve in 3D and a 3D
bush-like structure including images of both.

The only program that covers 3D L-Systems is Lparser by Laurens Lapre but it's
MS DOS only. But I will rummage through the .LS files to find things we can use.

Cheers, Droj


Post a reply to this message

From: Droj
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 22 Jul 2023 00:05:00
Message: <web.64bb5403753f6154915286f3b2af915@news.povray.org>
"Droj" <803### [at] drojde> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
>

> >
> > But I'm not sure how the rules should work in 3D. Have you seen any such
> > images with accompanying 3D rules? If so, that would help me understand what is
> > needed.
> >
>
Hi TOK,

Let's take the example of PB's Pythagoras tree. We can easily use a copy of it
and rotate it 90*y to get a tree with more branches.
But instead we can use your L-system directly and the following axiom/rules:
axiom:
AB
rules:
A = [F[+F<A][-F<A]]
B = [F[^F<B][&F<B]] // rotate
< // l/LengthScale
angle = 45 degrees
The confusing thing is: Lindenmayer's System is a righthanded system and ^ and &
mean pitch up/pitch down.
We are used to the lefthanded system and that means to me: roll left/roll right
in which case we have to use \ and /.

See image generated with L. Lapres Lparser and rendered with Povray.

Here's a link with lots of examples:
https://www.houdinikitchen.net/2019/12/21/how-to-create-l-systems/

Cheers, Droj


Post a reply to this message


Attachments:
Download 'pyth017.png' (267 KB)

Preview of image 'pyth017.png'
pyth017.png


 

From: ingo
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 22 Jul 2023 04:35:00
Message: <web.64bb93b9753f61517bac71e8ffb8ce3@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:

> I'm just lurking around in the background. I do not have as much time for
> POV-Ray code writing as I once had.

Same here.
You have some nice looking projects there.

ingo


Post a reply to this message

From: ingo
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 22 Jul 2023 04:35:00
Message: <web.64bb948e753f61517bac71e8ffb8ce3@news.povray.org>
"Droj" <803### [at] drojde> wrote:

> The only program that covers 3D L-Systems is Lparser by Laurens Lapre but it's
> MS DOS only.

The code of it is available https://github.com/jvail/L-System

A nice one to test stuff: https://jvail.github.io/L-System/

ingo


Post a reply to this message

From: jr
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 22 Jul 2023 12:05:00
Message: <web.64bbfd2c753f61580c03e9d6cde94f1@news.povray.org>
hi,

"ingo" <nomail@nomail> wrote:
> ...
> The code of it is available ...

and works, with v little work, on Linux.  liking the VRML output :-).


regards, jr.


Post a reply to this message

From: Droj
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 26 Jul 2023 08:55:00
Message: <web.64c11767753f615a0768d5a3b2af915@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:

> If so, then I've shown how this can be used without much adaptation in a new
> example in the repository.
>
> Please post some more images made with the axioms and rules that you've
> collected.
>

Hi TOK,

I packed some POV files using your L-system in the archive below to extend your
examples collection.

Cheers, Droj


Post a reply to this message


Attachments:
Download 'tok_l-sytems.zip' (12 KB)

<<< Previous 9 Messages Goto Latest 10 Messages Next 10 Messages >>>

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