POV-Ray : Newsgroups : povray.general : Simple L-system library for POV-Ray v3.7 Server Time
27 Dec 2024 13:28:33 EST (-0500)
  Simple L-system library for POV-Ray v3.7 (Message 1 to 10 of 29)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Tor Olav Kristensen
Subject: Simple L-system library for POV-Ray v3.7
Date: 17 Jul 2023 10:40:00
Message: <web.64b55265a6c2a55967f8fe5789db30a9@news.povray.org>
Hi

Since Ingo didn't want to delve deeper into the rabbit hole, I started to
rewrite his L-system code to work in POV-Ray v3.7.

The changes were so many that the code is now quite different from his (except
perhaps the code for the L_Transform macro). The most important change is to use
an array of functions instead of macros chosen with a switch statement.

Here's what I've made so far:
https://github.com/t-o-k/POV-Ray-L-system

I may a add bit more functionality and some more examples later.

--
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: 17 Jul 2023 16:45:00
Message: <web.64b5a72f753f615dec7f1e73b2af915@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> Hi
>
> Since Ingo didn't want to delve deeper into the rabbit hole, I started to
> rewrite his L-system code to work in POV-Ray v3.7.
>
> The changes were so many that the code is now quite different from his (except
> perhaps the code for the L_Transform macro). The most important change is to use
> an array of functions instead of macros chosen with a switch statement.
>
> Here's what I've made so far:
> https://github.com/t-o-k/POV-Ray-L-system
>
> I may a add bit more functionality and some more examples later.
>
> --
> Tor Olav
> http://subcube.com
> https://github.com/t-o-k

Hi TOK,

My Goodness, that's an awsome piece of work and a big THANK YOU for delving into
that rabbit hole.
If it is okay with you I'll provide some more examples as I already collected a
bunch of axioms and rules some of which worked as predicted. Others had to be
adapted (like the one below from P. Bourke,
http://paulbourke.net/fractals/lsys).

Well, it's one my favorite L-System things - they call it Pythagoras tree - here
at iteration level 9.

Cheers, Droj


Post a reply to this message


Attachments:
Download 'pythagoras_tree.png' (195 KB)

Preview of image 'pythagoras_tree.png'
pythagoras_tree.png


 

From: Droj
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 17 Jul 2023 17:25:00
Message: <web.64b5b0a8753f615dec7f1e73b2af915@news.povray.org>
"Droj" <803### [at] drojde> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > Hi
> >
> > Since Ingo didn't want to delve deeper into the rabbit hole, I started to
> > rewrite his L-system code to work in POV-Ray v3.7.
> >
> > The changes were so many that the code is now quite different from his (except
> > perhaps the code for the L_Transform macro). The most important change is to use
> > an array of functions instead of macros chosen with a switch statement.
> >
> > Here's what I've made so far:
> > https://github.com/t-o-k/POV-Ray-L-system
> >
> > I may a add bit more functionality and some more examples later.
> >
> > --
> > Tor Olav
> > http://subcube.com
> > https://github.com/t-o-k
>
> Hi TOK,
>
> My Goodness, that's an awsome piece of work and a big THANK YOU for delving into
> that rabbit hole.
> If it is okay with you I'll provide some more examples as I already collected a
> bunch of axioms and rules some of which worked as predicted. Others had to be
> adapted (like the one below from P. Bourke,
> http://paulbourke.net/fractals/lsys).
>
> Well, it's one my favorite L-System things - they call it Pythagoras tree - here
> at iteration level 9.
>
> Cheers, Droj

Here is the Povray file


Post a reply to this message


Attachments:
Download 'pythagoras_tree.pov.txt' (3 KB)

From: Tor Olav Kristensen
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 17 Jul 2023 18:20:00
Message: <web.64b5bde6753f615eafa6bc789db30a9@news.povray.org>
"Droj" <803### [at] drojde> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > Hi
> >
> > Since Ingo didn't want to delve deeper into the rabbit hole, I started to
> > rewrite his L-system code to work in POV-Ray v3.7.
> >
> > The changes were so many that the code is now quite different from his (except
> > perhaps the code for the L_Transform macro). The most important change is to use
> > an array of functions instead of macros chosen with a switch statement.
> >
> > Here's what I've made so far:
> > https://github.com/t-o-k/POV-Ray-L-system
> >
> > I may a add bit more functionality and some more examples later.
> >
> > --
> > Tor Olav
> > http://subcube.com
> > https://github.com/t-o-k
>
> Hi TOK,
>
> My Goodness, that's an awsome piece of work and a big THANK YOU for delving into
> that rabbit hole.
> If it is okay with you I'll provide some more examples as I already collected a
> bunch of axioms and rules some of which worked as predicted. Others had to be
> adapted (like the one below from P. Bourke,
> http://paulbourke.net/fractals/lsys).
>
> Well, it's one my favorite L-System things - they call it Pythagoras tree - here
> at iteration level 9.

Thank you Droj. It was an interesting challenge to make this.

That's indeed a nice L-system tree. I think I like it more than the one PB made.

Is it this axiom and rule that you had to adapt ?

  axiom = FX
  X -> >[-FX]+FX
  angle = 40

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.

--
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: 17 Jul 2023 20:55:00
Message: <web.64b5e12f753f615dec7f1e73b2af915@news.povray.org>
"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.

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.
>
> 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.

Cheers, Droj


Post a reply to this message

From: Droj
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 17 Jul 2023 21:20:00
Message: <web.64b5e7f6753f615dec7f1e73b2af915@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.
>
> 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.
> >
> > 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.
>
> Cheers, Droj

Here is the Hilbert curve


Post a reply to this message


Attachments:
Download 'hilbert_curve.pov.txt' (3 KB)

From: ingo
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 18 Jul 2023 01:20:00
Message: <web.64b6204e753f61517bac71e8ffb8ce3@news.povray.org>
"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.

ingo


Post a reply to this message

From: Colin Fleming
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 18 Jul 2023 07:20:00
Message: <web.64b674e1753f615bcd5880a93be1c3d@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> Hi
>
> Since Ingo didn't want to delve deeper into the rabbit hole, I started to
> rewrite his L-system code to work in POV-Ray v3.7.
>
> The changes were so many that the code is now quite different from his (except
> perhaps the code for the L_Transform macro). The most important change is to use
> an array of functions instead of macros chosen with a switch statement.
>
> Here's what I've made so far:
> https://github.com/t-o-k/POV-Ray-L-system
>
> I may a add bit more functionality and some more examples later.
>
> --
> Tor Olav
> http://subcube.com
> https://github.com/t-o-k

Hi Tor,

This is great work!

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

(or buy it from a well known website!)

Thank.


Post a reply to this message

From: Droj
Subject: Re: Simple L-system library for POV-Ray v3.7
Date: 19 Jul 2023 09:55:00
Message: <web.64b7ea85753f615763e4a273b2af915@news.povray.org>
"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
(<).

Cheers, Droj


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 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

Goto Latest 10 Messages Next 10 Messages >>>

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