POV-Ray : Newsgroups : povray.general : L-Systems in Povray Server Time
27 Jul 2024 16:12:37 EDT (-0400)
  L-Systems in Povray (Message 31 to 40 of 64)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
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

From: Droj
Subject: Re: L-Systems in Povray
Date: 10 Jul 2023 13:05:00
Message: <web.64ac397e453cebfcf62c2adc3b2af915@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,

after a lot of brooding over LIFO ( and waiting for one of the Muses to kiss me
- none of them did) I gave it a try.
Be warned Povray complains: Expected 'array identifier', undeclared identfier
'Vertices' found instead.
What it should do is: produce a simple sort Pythagoras tree.

Hope you are not laughing your head off when you see my humble efforts.

Please advice

Cheers
Droj


Post a reply to this message


Attachments:
Download 'lsys7.pov.txt' (4 KB)

From: jr
Subject: Re: L-Systems in Povray
Date: 10 Jul 2023 13:35:00
Message: <web.64ac410a453cebfcb49d80446cde94f1@news.povray.org>
hi,

"Droj" <803### [at] drojde> wrote:
> ...
> after a lot of brooding over LIFO ( and waiting for one of the Muses to kiss me
> - none of them did) I gave it a try.

you're supposed to be clean shaven before kissing :-)


> Be warned Povray complains: Expected 'array identifier', undeclared identfier
> 'Vertices' found instead.
> What it should do is: produce a simple sort Pythagoras tree.
>
> Hope you are not laughing your head off when you see my humble efforts.

"ha ha".  so, we got that out of the way ;-)


> Please advice

should be able to find some time to look over the code (thanks) before the week
is out.


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: L-Systems in Povray
Date: 10 Jul 2023 13:50:00
Message: <web.64ac43e2453cebfc1f9dae3025979125@news.povray.org>
"Droj" <803### [at] drojde> wrote:

> Be warned Povray complains: Expected 'array identifier', undeclared identfier
> 'Vertices' found instead.

So, I dabbled a bit with this to get it to work, and it seems that you're
running into the same sort of weird behaviour of the parser that I was running
into with my kumiko triangles.  POV-Ray should definitely be assigning a value -
any value - to Vertices, but it doesn't.

In order to force the issue, I changed the ending of the macro to:
#declare Vertices = Return;
Vertices


and then POV-Ray crashed, almost immediately.

So I'm again strongly suggesting that there IS a bug, Lvalues are NOT getting
defined when they are clearly being declared in the usual manner.  I've done
this sort of thing before for years, and it's not a newbie error, bad syntax, or
some misunderstanding about how things get declared.  I changed all of the
pertinent #local statements to #declare, and all manner of other hocus pocus to
try to get the macro to work.

_Something_ is going awry in the source code that has something to do with the
scope of variables declared in macros, and possibly include files.  Since jr
(and IIRC someone else) looked into this and tested my triangle code and it
seemed to work for them, the problem seems to be system architecture / OS /
version / build dependent.

So - I don't see you doing anything wrong - I think there's a real problem that
doesn't seem like it will be easy to track down.

I do suggest that you take that into account and see if you can code a
workaround, and plug in a few lines of debugging code to see what gets defined,
what the array dimensions are as the code progresses, and how many iterations of
loops you're instantiating - since I'm not sure what's making my monkey-wrenched
code trigger a hard crash.

- BW


Post a reply to this message


Attachments:
Download 'lsys7_bw_crashes.pov.txt' (5 KB)

From: jr
Subject: Re: L-Systems in Povray
Date: 10 Jul 2023 13:50:00
Message: <web.64ac441c453cebfcb49d80446cde94f1@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> ...
> should be able to find some time to look over the code (thanks) before the week
> is out.

as a first clue though, testing for 'Vertices's existence in the line following
the declaration says no.  so the workings in 'Lvertices()' need to be
"debugged", it looks.


regards, jr.


Post a reply to this message

From: jr
Subject: Re: L-Systems in Povray
Date: 10 Jul 2023 18:15:00
Message: <web.64ac82c7453cebfcb49d80446cde94f1@news.povray.org>
> "jr" <cre### [at] gmailcom> wrote:
> > ...
> > should be able to find some time to look over the code (thanks) before the week
> > is out.
>
> ... so the workings in 'Lvertices()' need to be "debugged", it looks.

in Lvertices(), the for loop needs to read '#for (i,1,strlen(Lstr))'.  then the
problem becomes that you have no 'BuildRules' key for 'X', yet.  hth.


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: L-Systems in Povray
Date: 10 Jul 2023 20:10:00
Message: <web.64ac9d71453cebfc1f9dae3025979125@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> in Lvertices(), the for loop needs to read '#for (i,1,strlen(Lstr))'.  then the
> problem becomes that you have no 'BuildRules' key for 'X', yet.  hth.

So, I added:

#declare BuildRules["X"] = asc("X");

and

#declare Axiom = "FFFFX";
#declare Rules = dictionary {
  ["X"] : "F[-F|][+F|]",
 // ["Y"] : "FX-Y"
}

I have NO idea what I'm doing, but that gets me a completed render and no
crashing.

I'm wondering if the X's in the Rules create an infinite recursion of some sort,
and that causes the crash?



--- I'm interested in how the branching works, since I was toying with a scene
to make "roots" or "vines" randomly grow and branch out around the outside of a
cylinder....


- BW


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.