POV-Ray : Newsgroups : povray.general : How to read a pov file? : Re: How to read a pov file? Server Time
2 Aug 2024 06:18:57 EDT (-0400)
  Re: How to read a pov file?  
From: Alf Peake
Date: 3 Jan 2005 15:53:38
Message: <41d9b0d2@news.povray.org>
To satisfy my own curiosity re memory requirements (and as an
excercise), this is the result of playing with a MolPov output file.

I used a text editor to Cut and Save the scene setup.
Careful use of search and replace or delete on the remainder modifies
each object as shown in <Before> and <After>, leaving a string and 3
vectors. POV-Ray then reads this file and writes/appends a union{} for
each pigment in one pass to a second *.POV file. The original scene
setup is then pasted in.

<Before>
//  Object: description ...
object
{    sphere {<0, 0, 0>, 1.0 }
      texture
     {
     pigment
      {  color Gray
      }
   }
scale < 1.65,  1.65,  1.65>
translate < 1.404333, 0, 0>
}
</Before>

<After> (a temp file)
"//  Object: description ...
",
<1.75,0.75,0.75>
,< 1.65,  1.65,  1.65>
,< 1.404333, 0, 0>
,
</After>

Before and after stats, -d
Finite objects:         7378

Original *.pov 1790KB (#included "colours.inc")
Peak memory used:           8685329 bytes
CPU time used: kernel 0.13 seconds, user 1.67 seconds, total 1.80
seconds

Modified *.pov  591KB ("colours.inc" not #included)
Peak memory used:           2577761 bytes
CPU time used: kernel 0.13 seconds, user 1.36 seconds, total 1.48
seconds

Alf


Post a reply to this message

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