#include "spline.mcr" global_settings { ambient_light <0,0,0> } #declare Image = function { pigment { image_map { sys "Hentschels_small.bmp" } } } #declare ImageWidth = 360; #declare ImageHeight = 240; #declare R1=seed(210410); #declare IndY = 0; #while(IndY < ImageHeight) #declare IndX = 0; #while(IndX < ImageWidth) #declare ImageColor = Image(IndX/ImageWidth, IndY/ImageHeight, 0); box { <-0.5,-50,-0.5> <0.5, rand(R1)*2,0.5> pigment { color ImageColor } translate <-ImageWidth/2 + IndX, 0, -ImageHeight/2 + IndY> } #declare IndX = IndX+1; #end #declare IndY = IndY+1; #end //box { <-120,-50,-180>,<120,2,180> pigment { color <1,1,1> } } /*sphere { <80,-20,-500>, 10 pigment { color <1,0.4,0.5> } } sphere { <60,-10,-300>, 10 pigment { color <1,0.4,0.5> } } sphere { <40,0,-200>, 10 pigment { color <1,0.4,0.5> } } sphere { <30,5,-100>, 10 pigment { color <1,0.4,0.5> } } sphere { <20,5,-20>, 10 pigment { color <1,0.4,0.5> } } sphere { <10,20,-10>, 10 pigment { color <1,0.4,0.5> } } sphere { <5,80,-5>, 10 pigment { color <1,0.4,0.5> } } sphere { <0,200,0>, 10 pigment { color <1,0.4,0.5> } } sphere { <0,400,0>, 10 pigment { color <1,0.4,0.5> } }*/ #declare MyPath = create_spline ( array[9] { <80,-20,-500>, <60,-10,-300>, <40,0,-200>, <20,5,-100>, <10,10,-20>, <0,40,-10>, <0,100,-5>, <0,200,-3>, <0,550,-1>}, spline_loop (no) + spline_sampling(5) + spline_cache_file("spline.tmp")) evaluate_spline (MyPath, default_options) #debug concat("spline_pos: <", vstr(3, spline_pos,", ",0,3), ">\n") //preview_spline (MyPath, default_options) //box { <-8,-5,-20>,<8,5,20> pigment { color <0.5,0.4,1> } animate_by_spline (MyPath, auto_banking(0)+auto_rotate(0))} //camera { location <-900, 50, -200> look_at <0,10,-200> angle 35 } //light_source { <-400, 10, -200>, 1 } camera { location spline_pos //location <0, 300, -1> angle 35 look_at <0,0,0> } light_source { <200, 500, -100>, 1 } light_source { spline_pos color <1,1,1> spotlight radius 10 falloff 20 tightness 0 point_at <0,0,0> }