POV-Ray : Newsgroups : povray.general : Any way to avoid repeated parsing? : Re: Any way to avoid repeated parsing? Server Time
11 Aug 2024 11:26:20 EDT (-0400)
  Re: Any way to avoid repeated parsing?  
From: PoD
Date: 19 Sep 1999 17:32:57
Message: <37E557AB.D1CC1582@merlin.net.au>
Nieminen Juha wrote:
> 
> Mark Wagner <mar### [at] gtenet> wrote:
> : Add a 'static' object modifier to the language that can be applied to
> : anything, for example:
> 
> : sphere{<0,0,0>, 1 pigment{ rgb 1} static}
> 
> :  POV-Ray will not reparse any object that contains that modifier after the
> : first frame of an animation.  If you apply it to an object that does get
> : changed over the course of an animation, that's your problem, not POV's.
> 
>   I think this is not enough either. Povray will have to parse the entire
> file anyways if there's some non-static objects (for example at the end of
> the file). One solution to this is, of course, to keep a copy of the scene
> in memory with all static objects removed.
>   There's another problem: If all objects generated in a #while-loop are
> static, that loop doesn't need to be parsed but just once. But how do you
> tell this to povray?
> 
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

how about a static block i.e.
static{
  ...
}

easy to skip in parsing and can contain anything.
Of course the scene coder has to be extra careful what's put in there.

Cheers, PoD.


Post a reply to this message

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