POV-Ray : Newsgroups : povray.text.scene-files : Superheptic poly reference Server Time
23 Dec 2024 21:34:49 EST (-0500)
  Superheptic poly reference (Message 1 to 1 of 1)  
From: David Fontaine
Subject: Superheptic poly reference
Date: 7 Jun 2000 17:45:08
Message: <393EC15A.1D7DB927@faricy.net>
#fopen FOO "polyordr.txt" write
#declare
Name=array[12]{"Linear","Quadric","Cubic","Quartic","Quintic","Sextic","Septic","Octic","Nonic","Decic","Undecic","Dodecic"}

#declare O=1;
#while (O<=12) // Highest order
   #write(FOO,concat(Name[O-1],"\n"))
   #declare C=1;
   #declare X=O;
   #while (X>=0)
      #declare Y=O-X;
      #while (Y>=0)
         #declare Z=O-X-Y;
         #while (Z>=0)
            #declare STR=concat(str(C,3,0)," ")
            #if (X>0)
               #declare STR=concat(STR,"x")
               #if (X>1)
                  #declare STR=concat(STR,str(X,1,0))
               #end
            #end
            #if (Y>0)
               #declare STR=concat(STR,"y")
               #if (Y>1)
                  #declare STR=concat(STR,str(Y,1,0))
               #end
            #end
            #if (Z>0)
               #declare STR=concat(STR,"z")
               #if (Z>1)
                  #declare STR=concat(STR,str(Z,1,0))
               #end
            #end
            #if (X+Y+Z=0)
               #declare STR=concat(STR,"1")
            #end
            #declare STR=concat(STR,"\n")
            #write(FOO,STR)
            #declare C=C+1;
            #declare Z=Z-1;
         #end
         #declare Y=Y-1;
      #end
      #declare X=X-1;
   #end
   #write(FOO,"\f")
   #declare O=O+1;
#end
#fclose FOO

sphere { 0,1 }

--
David Fontaine     <dav### [at] faricynet>     ICQ 55354965
Please visit my website: http://www.faricy.net/~davidf/


Post a reply to this message

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