// CE1 / Pole Wrapped by Automaton Ribbon '08.03 // by Tsutomu HIGO URL:http://www.asahi-net.or.jp/~nj2t-hg/ #version 3.6; global_settings { assumed_gamma 2.2 max_trace_level 4 } light_source {<-100, 100, -180> color <2, 2, 2>} camera { location <0, 0, -500> angle 13 look_at <0, 5, 0> } #declare R1 = seed(10); #declare Nmax = 12; #declare Nmay = 4*288; #declare Cp = array[2*Nmax][Nmay] #declare Ny = 0; #while (Ny < Nmay) #declare Nx = 0; #while (Nx < 2*Nmax) #declare Cp[Nx][Ny] = int(5.9999999*rand(R1)); #switch (Cp[Nx][Ny]) #case (0) #declare Cp[Nx][Ny] = 0; #break #case (1) #declare Cp[Nx][Ny] = 3; #break #case (2) #declare Cp[Nx][Ny] = 2; #break #case (3) #declare Cp[Nx][Ny] = 0; #break #case (4) #declare Cp[Nx][Ny] = 1; #break #case (5) #declare Cp[Nx][Ny] = 1; #break #end #declare Nx = Nx+1; #end #declare Ny = Ny+1; #end union { #declare Ny = 1; #while (Ny < Nmay) #declare Nx = 0; #while (Nx < 2*Nmax) #declare Cp[Nx][Ny] = mod(Cp[mod(Nx-1+2*Nmax, 2*Nmax)][Ny-1]+Cp[Nx][Ny-1]+Cp[mod(Nx+1, 2*Nmax)][Ny-1], 6); #switch ( Cp[Nx][Ny] ) #case (0) #declare Cp[Nx][Ny] = 0; #break #case (1) #declare Cp[Nx][Ny] = 3; #break #case (2) #declare Cp[Nx][Ny] = 2; #break #case (3) #declare Cp[Nx][Ny] = 0; #break #case (4) #declare Cp[Nx][Ny] = 1; #break #case (5) #declare Cp[Nx][Ny] = 1; #break #end #if(Cp[Nx][Ny] =1) sphere {<-50, 0, 0>, 0.4 rotate y*-1.2*Ny translate y*(Nx+Ny*0.1-Nmay*0.1/2) pigment {color rgb <1, 1, 1>} } #end #if(Cp[Nx][Ny] =2) sphere {<-50, 0, 0>, 0.4 rotate y*-1.2*Ny translate y*(Nx+Ny*0.1-Nmay*0.1/2) pigment {color rgb <1, 0.7, 0.5>} } #end #if(Cp[Nx][Ny] =3) sphere {<-50, 0, 0>, 0.4 rotate y*-1.2*Ny translate y*(Nx+Ny*0.1-Nmay*0.1/2) pigment {color rgb <1, 0.3, 0.2>} } #end #declare Nx = Nx+1; #end #declare Ny = Ny+1; #end finish { reflection 0.6 phong 2 brilliance 1 ambient 0.3 } no_shadow } cylinder {Nmay*0.1*y, -Nmay*0.1*y, 48 pigment {color rgbt <0, 0, 0.2, 0.8>} } background {color rgb <0, 0, 0.2>}