POV-Ray : Newsgroups : povray.general : Leaking Animation sample : Leaking Animation sample Server Time
3 May 2024 06:14:13 EDT (-0400)
  Leaking Animation sample  
From: dick balaska
Date: 8 May 2016 01:37:28
Message: <572ed098$1@news.povray.org>
Here's a demo of an animation render that leaks memory.
Rotate 2000 spheres about a cylinder while looking down on it.

     Mem      VM
  13,736   7,220 pvengine64.exe @ boot
170,732 169,588 after run #1 (1m 54s)
313,056 313,644 after run #2 (1m 54s)

(standard 640x480 size selected in the dropdown)

//-------------------------------------------------------------
povwin command line:
leaktest.ini +SF1 +EF240 -GA

//-------------------------------------------------------------
leaktest.ini:
Input_File_Name = leaktest.pov
Width = 720
Height = 480
Quality = 9
Final_Frame = 240

//-------------------------------------------------------------
leaktest.pov:
// leaktest.pov
// Make an animation for clipka to demonstrate povwin leaks
// 240 frames

#version 3.7;
global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 0.1 diffuse 0.9 }}
#include "colors.inc"
#declare Camera_0 = camera {perspective angle 75
   location  <0.0 , 50.0 ,-3.0>
   right     x*image_width/image_height
   look_at   <0.0 , 1.0 , 0.0>}
camera{Camera_0}
light_source{< 3000,3000,-3000> color White}
plane { <0,1,0>, 0
	texture { pigment {White}}
}
// Move a float: from, to, increment
#macro MoveF(_from, _to, __i)
   (_from+((_to-_from)*__i))
#end

#declare Rpos=seed(300);
#declare _maxY=20;
#declare _z = 10;
#local _i=0;
#while (_i<2000)
   #local _startRot=rand(Rpos);
   #local _endRot=rand(Rpos);
   sphere { <0,0,0>, rand(Rpos)*2+.5
     texture {pigment{ color Red }}
     translate<0,rand(Rpos)*_maxY,_z>
     rotate y*MoveF(_startRot, _endRot, clock)*360
   }
   #local _i=_i+1;
#end


Post a reply to this message

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