POV-Ray : Newsgroups : povray.general : L-Systems in Povray Server Time
27 Jul 2024 18:42:26 EDT (-0400)
  L-Systems in Povray (Message 25 to 34 of 64)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: jr
Subject: Re: L-Systems in Povray
Date: 6 Jun 2023 13:25:00
Message: <web.647f6b04453cebfcb49d80446cde94f1@news.povray.org>
hi,

"Droj" <803### [at] drojde> wrote:
> "ingo" <nomail@nomail> wrote:
> > "Droj" <803### [at] drojde> wrote:
> > > I would love to see how you implement the third dimension!
> > grab the code and experiment. ...
>
> thanks for your advice. It will all take a WHILE. Have to learn coding first.

heh, don't beat yourself up.  since you've been "using Povray (as a bloody user
of course) for more than 35 years", I'm pretty sure you won't .. faint at the
sight of a '#while' :-).


regards, jr.


Post a reply to this message

From: Droj
Subject: Re: L-Systems in Povray
Date: 6 Jun 2023 16:20:00
Message: <web.647f90f4453cebfcf62c2adc3b2af915@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "Droj" <803### [at] drojde> wrote:
> > "ingo" <nomail@nomail> wrote:
> > > "Droj" <803### [at] drojde> wrote:
> > > > I would love to see how you implement the third dimension!
> > > grab the code and experiment. ...
> >
> > thanks for your advice. It will all take a WHILE. Have to learn coding first.
>
> heh, don't beat yourself up.  since you've been "using Povray (as a bloody user
> of course) for more than 35 years", I'm pretty sure you won't .. faint at the
> sight of a '#while' :-).
>
>
> regards, jr.

Hi jr,

not faint at the sight of a #while but of (a) 35 years WHILE I've been missing
crucial things in Povray :-)).

Being a _bloody_user_only (starting with Povray 2.? and Moray 1.5, MS DOS
versions) now 'wasted WHILE time' strikes back.

I feel like Ingo got me by the 'short hair': I am able to use a macro (most of
the times), sometimes adapt something (happy when it works, if not: depressed),
understanding the concept (sometimes - more or less - not 'word by word') but
separating positions and angles for 3D / creating a LIFO array - that's way
beyond me.

I'll try to do my best but to cover that gap is a huge thing. At least I could
add something to Ingo's code to produce the 'Pentaplexity' (still crude using
Ingo's words).

Thanks for cheering me up

Cheers, Droj


Post a reply to this message


Attachments:
Download 'lsys6.png' (771 KB)

Preview of image 'lsys6.png'
lsys6.png


 

From: ingo
Subject: Re: L-Systems in Povray
Date: 7 Jun 2023 00:55:00
Message: <web.64800d44453cebfc17bac71e8ffb8ce3@news.povray.org>
"Droj" <803### [at] drojde> wrote:

> I feel like Ingo got me by the 'short hair':


Pos is an 'abused' vector. <x,y,angle>. Instead I could have used:
#local Pos2D = <x, y>;
#local Angle = 25;

Now angle and location are separated.

So
#macro F(Pos)
  <Pos.x + cos(Pos.z), Pos.y + sin(Pos.z), Pos.z> // <x, y, angle>
#end
#declare BuildRules["F"] = 70; //chr(70) = F

becomes

#macro F(Pos, Angle)
  <Pos2D.x + cos(Angle), Pos2D.y + sin(Angle)> // <x, y>
  //the angle is fixed
#end
#declare BuildRules["F"] = 70; //chr(70) = F



#macro Plus(Pos)
  <Pos.x, Pos.y, Pos.z + (pi/2)>
#end
#declare BuildRules["+"] = 43;

#macro Plus(Angle)
  Angle + (pi/2)
#end
#declare BuildRules["+"] = 43;


And
    #ifdef (BuildRules[CurrentSymbol])
      #switch (BuildRules[CurrentSymbol])
        #case(70)
          #local Pos = F(Pos);
        #break
        #case(43)
          #local Pos = Plus(Pos);
        #break

becomes

    #ifdef (BuildRules[CurrentSymbol])
      #switch (BuildRules[CurrentSymbol])
        #case(70)
          #local Pos = F(Pos, Angle);
        #break
        #case(43)
          #local Pos = Plus(Angle);
        #break


now the Pos vector and angle are separated. The next step is to turn them into
3D vectors. You can use a 3D vector for the three angles too.
(untested code)


Post a reply to this message

From: jr
Subject: Re: L-Systems in Povray
Date: 7 Jun 2023 15:45:00
Message: <web.6480ddb8453cebfcb49d80446cde94f1@news.povray.org>
hi,

"Droj" <803### [at] drojde> wrote:
> ...
> not faint at the sight of a #while but of (a) 35 years WHILE I've been missing
> crucial things in Povray :-)).
> Being a _bloody_user_only (starting with Povray 2.? and Moray 1.5, MS DOS
> versions) now 'wasted WHILE time' strikes back.

looking at the image posted, methinks thou protest too much.  </grin>  v nice.


> I feel like Ingo got me by the 'short hair': I am able to use a macro (most of
> the times), sometimes adapt something (happy when it works, if not: depressed),
> understanding the concept (sometimes - more or less - not 'word by word') but
> separating positions and angles for 3D / creating a LIFO array - that's way
> beyond me.
> I'll try to do my best but to cover that gap is a huge thing. At least I could
> add something to Ingo's code to produce the 'Pentaplexity' (still crude using
> Ingo's words).

re LIFOs, have a look at 'queues.inc'.  (even though the demos suck)


regards, jr.


Post a reply to this message

From: Droj
Subject: Re: L-Systems in Povray
Date: 8 Jun 2023 16:30:00
Message: <web.648235b3453cebfc9f5def123b2af915@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "Droj" <803### [at] drojde> wrote:
> > ...
> > not faint at the sight of a #while but of (a) 35 years WHILE I've been missing
> > crucial things in Povray :-)).
> > Being a _bloody_user_only (starting with Povray 2.? and Moray 1.5, MS DOS
> > versions) now 'wasted WHILE time' strikes back.
>
> looking at the image posted, methinks thou protest too much.  </grin>  v nice.
>
>
> > I feel like Ingo got me by the 'short hair': I am able to use a macro (most of
> > the times), sometimes adapt something (happy when it works, if not: depressed),
> > understanding the concept (sometimes - more or less - not 'word by word') but
> > separating positions and angles for 3D / creating a LIFO array - that's way
> > beyond me.
> > I'll try to do my best but to cover that gap is a huge thing. At least I could
> > add something to Ingo's code to produce the 'Pentaplexity' (still crude using
> > Ingo's words).
>
> re LIFOs, have a look at 'queues.inc'.  (even though the demos suck)
>
>
> regards, jr.

Hi,

that was the 'piece-of-cake' part for the 'bloody user'.

I tried Ingo's advice separating location and angle. Whatever I did Povray
complained ("Float expected, but ... found instead" or "Bad operand for dot
expression"). Now I know why he warned me with <untested code>.
Will still investigate where I took the wrong turn.

I had a look at your 'queues.inc'. I'm still goggle-eyed with my mouth agape!
</)):-o>

I wouldn't say the demos suck - maybe a bit too 'academic' or not 'descriptive'.

Still I have to chew on LIFO and maybe can digest it - not sure - that's for
sure.

But I will not give up.

My objective is to get that Lparser thing working with Povray (or die). Forget
the last words.

regards, Droj


Post a reply to this message

From: Bald Eagle
Subject: Re: L-Systems in Povray
Date: 8 Jun 2023 18:55:00
Message: <web.64825c2e453cebfc1f9dae3025979125@news.povray.org>
"Droj" <803### [at] drojde> wrote:

> I tried Ingo's advice separating location and angle. Whatever I did Povray
> complained ("Float expected, but ... found instead" or "Bad operand for dot
> expression"). Now I know why he warned me with <untested code>.
> Will still investigate where I took the wrong turn.

Quote the line and post the exact error.   We run into these things all the
time, and sometimes they're a bit hard to decipher without help.

> I had a look at your 'queues.inc'. I'm still goggle-eyed with my mouth agape!
> </)):-o>

Yeah - jr's code isn't exactly readable for those not well-versed with
dictionaries, and his unique style of coding.  He does code up some amazing
stuff though.  And document it like a BOSS.


> Still I have to chew on LIFO and maybe can digest it - not sure - that's for
> sure.

WTH is "LIFO" ?

>
> But I will not give up.

That's the spirit.


- BW


Post a reply to this message

From: jr
Subject: Re: L-Systems in Povray
Date: 9 Jun 2023 03:55:00
Message: <web.6482da2d453cebfcb49d80446cde94f1@news.povray.org>
hi,

"Droj" <803### [at] drojde> wrote:
> ...
> that was the 'piece-of-cake' part for the 'bloody user'.

nevertheless.


> I tried Ingo's advice separating location and angle. Whatever I did Povray
> complained ("Float expected, but ... found instead" or "Bad operand for dot
> expression"). Now I know why he warned me with <untested code>.
> Will still investigate where I took the wrong turn.

saw that ingo posted an update.  looks like your weekend is taken care of.. :-)


> I had a look at your 'queues.inc'. I'm still goggle-eyed with my mouth agape!
> </)):-o>

well, thanks, I learned much (still do) from reading discussions by the regulars
here, "standing on the shoulders of giants", and all that.


> I wouldn't say the demos suck - maybe a bit too 'academic' or not 'descriptive'.

thank you.  food for thought, I feel and agree with.


> Still I have to chew on LIFO and maybe can digest it - not sure - that's for
> sure.

my first encounter with LIFOs came during apprenticeship in a hotel :-); the
plate warmers in the kitchen where the orders get plated up ?  stack.


> But I will not give up.
> My objective is to get that Lparser thing working with Povray (or die). Forget
> the last words.

:-)  (I, for one, will keep my eyes on this thread)


@BE.
am sure you've looked it up/puzzled it out by now, LIFO == last-in first-out.


regards, jr.


Post a reply to this message

From: Alain Martel
Subject: Re: L-Systems in Povray
Date: 9 Jun 2023 07:25:23
Message: <64830c23$1@news.povray.org>
Le 2023-06-08 à 18:54, Bald Eagle a écrit :
> "Droj" <803### [at] drojde> wrote:
> 
>> I tried Ingo's advice separating location and angle. Whatever I did Povray
>> complained ("Float expected, but ... found instead" or "Bad operand for dot
>> expression"). Now I know why he warned me with <untested code>.
>> Will still investigate where I took the wrong turn.
> 
> Quote the line and post the exact error.   We run into these things all the
> time, and sometimes they're a bit hard to decipher without help.
> 
>> I had a look at your 'queues.inc'. I'm still goggle-eyed with my mouth agape!
>> </)):-o>
> 
> Yeah - jr's code isn't exactly readable for those not well-versed with
> dictionaries, and his unique style of coding.  He does code up some amazing
> stuff though.  And document it like a BOSS.
> 
> 
>> Still I have to chew on LIFO and maybe can digest it - not sure - that's for
>> sure.
> 
> WTH is "LIFO" ?
> 
>>
>> But I will not give up.
> 
> That's the spirit.
> 
> 
> - BW
> 
> 

Another name for a LIFO is a stack.
It stands fro Last In, First Out.

There is also the FIFO, also known as a pipe.
That's First In, First Out.


Post a reply to this message

From: Droj
Subject: Re: L-Systems in Povray
Date: 11 Jun 2023 12:00:00
Message: <web.6485ef11453cebfcef371b9d3b2af915@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Droj" <803### [at] drojde> wrote:
>
> > I tried Ingo's advice separating location and angle. Whatever I did Povray
> > complained ("Float expected, but ... found instead" or "Bad operand for dot
> > expression"). Now I know why he warned me with <untested code>.
> > Will still investigate where I took the wrong turn.
>
> Quote the line and post the exact error.   We run into these things all the
> time, and sometimes they're a bit hard to decipher without help.
>
> > I had a look at your 'queues.inc'. I'm still goggle-eyed with my mouth agape!
> > </)):-o>
>
> Yeah - jr's code isn't exactly readable for those not well-versed with
> dictionaries, and his unique style of coding.  He does code up some amazing
> stuff though.  And document it like a BOSS.
>
>
> > Still I have to chew on LIFO and maybe can digest it - not sure - that's for
> > sure.
>
> WTH is "LIFO" ?
>
> >
> > But I will not give up.
>
> That's the spirit.
>
>
> - BW

BE,

> Quote the line and post the exact error.   We run into these things all the
> time, and sometimes they're a bit hard to decipher without help.
>

thanks but at the moment it won't help.

I turned too many screws at the same time which produced garbage.
So I made a 'spring cleaning' with the result that Povray doesn't complain
anymore.
Instead it rendered that famous image with the beautiful black sky and that
awesome black landscape.

Have to meditate first and then dive into F. Lohmueller's tutorials.

- Droj


Post a reply to this message

From: Droj
Subject: Re: L-Systems in Povray
Date: 11 Jun 2023 12:45:00
Message: <web.6485f96f453cebfcef371b9d3b2af915@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "Droj" <803### [at] drojde> wrote:
> > ...
> > that was the 'piece-of-cake' part for the 'bloody user'.
>
> nevertheless.
>
>
> > I tried Ingo's advice separating location and angle. Whatever I did Povray
> > complained ("Float expected, but ... found instead" or "Bad operand for dot
> > expression"). Now I know why he warned me with <untested code>.
> > Will still investigate where I took the wrong turn.
>
> saw that ingo posted an update.  looks like your weekend is taken care of.. :-)
>
>
> > I had a look at your 'queues.inc'. I'm still goggle-eyed with my mouth agape!
> > </)):-o>
>
> well, thanks, I learned much (still do) from reading discussions by the regulars
> here, "standing on the shoulders of giants", and all that.
>
>
> > I wouldn't say the demos suck - maybe a bit too 'academic' or not 'descriptive'.
>
> thank you.  food for thought, I feel and agree with.
>
>
> > Still I have to chew on LIFO and maybe can digest it - not sure - that's for
> > sure.
>
> my first encounter with LIFOs came during apprenticeship in a hotel :-); the
> plate warmers in the kitchen where the orders get plated up ?  stack.
>
>
> > But I will not give up.
> > My objective is to get that Lparser thing working with Povray (or die). Forget
> > the last words.
>
> :-)  (I, for one, will keep my eyes on this thread)
>
>
> @BE.
> am sure you've looked it up/puzzled it out by now, LIFO == last-in first-out.
>
>
> regards, jr.

Hi jr,

from an older threat:
<"using Povray (as a bloody user of course) for more than 35 years"

I have to correct that: it's around 30 years not 35.
That happens when you are woolgathering during calculus :-))

Good to know that you'll be around here.

Cheers, Droj


Post a reply to this message

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

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