POV-Ray : Newsgroups : povray.advanced-users : Self-including POV-Ray scene file : Self-including POV-Ray scene file Server Time
1 Jun 2023 01:02:19 EDT (-0400)
  Self-including POV-Ray scene file  
From: Bald Eagle
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

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

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