POV-Ray : Newsgroups : povray.general : inverse used in nested loop error : Re: inverse used in nested loop error (finally?) Server Time
9 Aug 2024 11:28:53 EDT (-0400)
  Re: inverse used in nested loop error (finally?)  
From: Bob Hughes
Date: 3 Sep 2000 16:05:30
Message: <39b2af0a@news.povray.org>
// PIII Win98SE 256MB
// when inverse is used in primitive rather than CSG difference
// error occurs, also only if in inner loop not outer loop

camera
{
    location -10*z
    look_at 0
}

light_source {-10,1}

#declare Count1=1; // first loop count
#while (Count1<6)
    #declare Count2=1; // second loop count
    #while (Count2<22) // errors if >=22, not <=21
        // CSG object
        union
        {
            difference
            {
                sphere
                {
                  0,2
                 }
                cone
                {
                 -y,1,y,0
                 }
                pigment {rgb .5}
            }
            difference
            {
                cone
                {
                    -y,1,y,0 // any object? (sphere, box, cylinder, etc.)
                    inverse // comment out if using other inverse below
                }
                cone
                {
                 -y,1,y,0
                 }
                // inverse // uncomment, no error (comment other out)
            }
            pigment {rgb 1.5}
        }

        #declare Count2=Count2+1;
    #end // inner loop
    #declare Count1=Count1+1;
#end // outer loop


Post a reply to this message

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