POV-Ray : Newsgroups : povray.beta-test : Functions more than 65535 : Functions more than 65535 Server Time
29 Jul 2024 12:24:20 EDT (-0400)
  Functions more than 65535  
From: R  Suzuki
Date: 12 May 2002 11:00:09
Message: <3cde8379@news.povray.org>
I think the limit of functions per scene in POV3.5 is 65535.

I've tried to test the behavior when the number of functions is
more than 65535.  The below is the test code.
I expected an error message something like ""Maximum number of 
functions per scene reached." but the current RC crashes.

Win2000, 256M,  both Intel and VC++ compile

R. Suzuki

------------------------------------------------------
#version 3.5;
#include "functions.inc" 

#declare F1=65600;

camera { location  <0, 0, -6.5>  direction z }
light_source { <-0,10,-40>  color rgb 2}

#macro SPHERE11(P1,P2)
  sphere {0,1  
     texture{ pigment{ 
       function{(cos(f_th(x,0,z)*P1+f_r(x,0,z)*4)*f_r(x,0,z)+1.5)/2.5
                *f_r(x,0,z)}
       color_map{[0 rgb <0.5,0.25,0.1>] 
                 [.25 rgb <0.85,0.7,0.5>][.5 rgb 1][1 rgb 1]}}
       finish{ambient 0.35}
     }
     scale <1,0.12,1> *0.5
  }
#end

#declare R1 = seed(1);

#declare N1=0;

#while (N1<F1) 
   #declare P1=rand(R1);
   object{
     SPHERE11(5+int(rand(R1)*10), rand(R1)) 
     translate <rand(R1)*100-50, rand(R1)*100-50,rand(R1)*20> 
   }          
   #declare N1=N1+1;
   #if (mod(N1, 5000)=0)
     #debug  concat("N1:",str(N1,3,0),"\n")
   #end
#end


Post a reply to this message

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