#include "colors.inc" #include "shapes.inc" #include "textures.inc" #include "glass.inc" #declare S = seed(0); #declare COLOR = array[3] { Red, Green, Blue } #macro Particle(RAD) object { Sphere scale RAD } #end #macro Boom(N, T) merge { #local I = 0; #while ( I < N ) #local X = (rand(S)-0.5)*200; #local Y = (rand(S)-0.5)*200; #local Z = (rand(S)-0.5)*200; #local R2 = X*X + Y*Y + Z*Z; #if ((5000 < R2) & (R2 < 10000)) // #local SIZE = rand(S)*1.0 + 0.5; #local C = int(mod(rand(S)*10, 3)); // object { Particle(SIZE/(T+1)) object { Particle(1) translate *T pigment { color COLOR[C] } } #local I = I + 1; #end #end } #end object { Boom(500, clock) } // 背景 background { color LightBlue } // 照明 light_source { <500, 800, -600> // 照明の位置 color White*1.5 parallel point_at <0, 0, 0> } light_source { <500, 800, 600> // 照明の位置 color White*1.5 parallel point_at <0, 0, 0> } light_source { <0, -800, 0> // 照明の位置 color White*0.5 parallel point_at <0, 0, 0> } // カメラ camera{ location <100.0, 100.0, -100.0> // カメラの位置 look_at <0.0, 0.0, -0.5> // カメラの注目する位置 angle 35 // カメラの視野角 }