POV-Ray : Newsgroups : povray.general : inverse used in nested loop error : inverse used in nested loop error Server Time
9 Aug 2024 01:19:34 EDT (-0400)
  inverse used in nested loop error  
From: Bob Hughes
Date: 2 Sep 2000 17:23:00
Message: <39b16fb4@news.povray.org>
Anyone mind trying to confirm this error?  The DOC says up to 200 nested
loops should be possible but I think it's only related to the fact a
'inverse' is in the CSG.  I tried small variations and the thing outlined
here seems to be the key problem.  Reason I say "double loop" is because it
doesn't occur if the CSG object is placed in the outer loop (singular
loop?).
If it's memory being the problem it appears to bestopping at about a count
of 110 instances of the object, which I thought had nothing to do with
nested levels anyway.
Appreciate any feedback so it can be reported or skipped.
  TIA,  Bob

// Persistence of Vision Ray Tracer Bug Description File
// File: inverseindoubleloopbug.pov
// Vers: 3.1, MegaPov 0.5
// Desc: CSG using inverse in a loop
// Date: 2000.675
// Auth: Bob Hughes
// Mail: per### [at] aolcom?subject=pov-bug
// Note: possible bug when doing CSG with "inverse" in loop as follows:
// PIII 500MHz Win98SE 256M SDRAM
//         Rendering error.
//         Too many nested objects
//         libpng: No IDATS written into file
//
//         Rendering error.
//         Error writing PNG file.


//#version unofficial MegaPov 0.5; // official or not, same

camera {location <-20,7.5,-25> angle 40 look_at <20,7.5,0>}
light_source {<10,10,-100>,1}

#declare Object= // whatever
 union {sphere {0,2} box {-1.5,1.5}}

#declare Count=5; // number count

#declare xV=0;
#declare yV=0;
#declare zV=0;
#declare Var3=1; // the starting number

#while (Count>0)

#declare Var1=1; // the counting number

#while (Var1<22) // count of instances (errors when 22 or more)

// error object
#declare Ni= // possibly any object can cause the error
 cone {-y,1,y,0

  inverse // introduces too many nested objects error

 }

#declare No=
 cone {-y,1,y,0}

// final object
union {
difference {
 object {Object}
 object {No}
  pigment {rgb .5}
 }
difference {
 object {Ni}
 object {Object

        // inverse // put here instead it keeps error from happening

         }
  pigment {rgb 1.5}
 }
   translate <xV,yV,zV> // position each in a grid
}

#declare Var1=Var1+1;
#declare xV=xV+4;

#end // inner loop

#declare xV=0;
#declare yV=yV+4;
#declare zV=0;
#declare Count=Count-1;
#declare Var3=Var3+1;

#end // outer loop


Post a reply to this message

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