POV-Ray : Newsgroups : povray.advanced-users : Self-including POV-Ray scene file Server Time
18 Apr 2024 12:25:32 EDT (-0400)
  Self-including POV-Ray scene file (Message 1 to 2 of 2)  
From: Bald Eagle
Subject: Self-including POV-Ray scene file
Date: 16 Feb 2023 17:20:00
Message: <web.63eeab71f57b4b641f9dae3025979125@news.povray.org>
Now for another crazy idea that - of course - came to me as I was _trying_ to
get some sleep.  Some days the brain never stops buzzing.

I recall discussing "pre-parsing" scene files to gather information preparatory
to a second parsing, though I of course can't find that thread.

Also, while writing my example scene to re-scale Sergey's 0-5.5 color_map, I
thought it would be great to be able to write macros and store data at the end
of the file where I didn't have to scroll past it to get to the functional parts
of the scene.  Very much like writing Arduino sketches, or programming languages
that are compiled - where you can reference things that aren't defined until
later in the file.

And then I thought, "What if I skipped the first part of the scene when I parsed
it, and then included the file so it would parsed again, and switched the parts
that got meaningfully/functionally parsed?

And that got me thinking about a recursive POV-Ray file.

Inception, SDL-style.

Let's see what you folks can do with it - maybe forward to a friend we haven't
seen on the forums in a long time to tempt them to try their hand at it.


Post a reply to this message


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

From: jr
Subject: Re: Self-including POV-Ray scene file
Date: 16 Feb 2023 21:25:00
Message: <web.63eee46fd2a5b2bc88a828ca6cde94f1@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> Now for another crazy idea that - of course - came to me as I was _trying_ to
> get some sleep.  Some days the brain never stops buzzing.

make it stand in the corner, on the "naughty step" ?!  :-)


> ... , or programming languages
> that are compiled - where you can reference things that aren't defined until
> later in the file.

would depend on the language I guess.  it would not work for (eg) C, where you
cannot have "forward references".


> ... where I didn't have to scroll past ...

you could simply use a real editor, designed for the job.  then you can "jump"
to a code reference, no need to "scroll".


regards, jr.


Post a reply to this message

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