#include "shapes.inc" #include "colors.inc" #include "transforms.inc" #include "metals.inc" #include "finish.inc" #include "math.inc" global_settings { max_trace_level 10 ambient_light rgb<1, 1, 1> } //light_source { <4,4, -5> color White} light_source { 100*<0,5, -2> color White} #declare ac =union{ cone{2*x,1,6*x,.01} cylinder { 2*x, -8.5*x, 1 } cone{1*x,.01,-6*x,6 scale <1,.02,1> translate -.8*y} cone{-6*x,.01,-8.5*x,3 scale <1,.02,1> translate +.9*y} cone{-6*x,.01,-8.5*x,1.5 scale <1,1.2,.02> translate 1*y} pigment{ White } finish { phong .2 phong_size 200 ambient .3 diffuse .5} } #declare bomb =union{ sphere{.2*x,.2} cylinder { .2*x, -.3*x, .2 } cone{-.3*x,.2,-.9*x,.001} cone{-.6*x,.001,-1.2*x,.3 scale <1,.02,1>} cone{-.6*x,.001,-1.2*x,.3 scale <1,1,.02>} pigment{ Orange*.7 } finish { phong .2 phong_size 200 ambient 1.2 diffuse 0} scale 4 } #declare L=15; #declare h=2*L; #declare R=5*L; #declare tot=2; #declare vx=R/tot; #declare x0=-R; #declare y0=h; #declare g = 2*h/(tot*tot); #declare tnow=1.5*tot*(clock-.25); #declare xnow=x0+vx*tnow; #declare xb = min(xnow,0); #declare tyb =max (tnow,0); #declare yb=max(h-.5*g*tyb*tyb,0); #declare vy=-g*tnow; #declare rangle=min(atan2(vy,vx)*180/pi,0); cylinder{x0*x,0,.2 pigment{Red} } cylinder{y*h,0,.2 pigment{Red} translate-R*x} object{ac rotate -x*15 translate y*(h+1.2)+xnow*x } object{bomb rotate rangle*z translate xb*x+yb*y } camera { location <-R/2, 2*h ,-20*L> look_at <-R/2, h/2, 0> angle 26} //target cylinder{0,-.2*z,L/2 pigment { wood pigment_map{ [0.3 color rgbf <1,1,1,.7>] [0.7 color rgbf <1,.3,.3,.7>] } scale 2 } rotate x*90 } //trajectory #declare ttemp = 0; #declare ttstep=tot/30; union{ #while (ttemp<=tot) #declare x1=x0+vx*ttemp; #declare y1=h-.5*g*ttemp*ttemp; #declare ttemp=ttemp+ttstep; #declare x2=x0+vx*ttemp; #declare y2=h-.5*g*ttemp*ttemp; cylinder { , , .15 } #end pigment{Yellow} finish{ambient 1} } //the sky from doc's standard example //the sky from doc's standard example sky_sphere { pigment { gradient y color_map { [0.000 0.002 color rgb <1.0, 1, 0.8> color rgb <1.0, 1, 0.8>] [0.002 0.200 color rgb <0.8, 0.8, 0.6> color rgb <0.2, 0.2, 0.8>] } scale 2 translate -1 } pigment { bozo turbulence 0.65 octaves 6 omega 0.7 lambda 2 color_map { [0.0 0.1 color rgb <0.85, 0.85, 0.85> color rgb <0.75, 0.75, 0.75>] [0.1 0.5 color rgb <0.75, 0.75, 0.75> color rgbt <1, 1, 1, 1>] [0.5 1.0 color rgbt <1, 1, 1, 1> color rgbt <1, 1, 1, 1>] } scale <0.2, 0.5, 0.2> } rotate -105*x rotate y*90 } plane { //grassy plane y, -.75 texture { pigment { color rgbt Green } finish { phong 20 ambient 1 diffuse 0} } }