//adapted 4/05 #include "colors.inc" #include "metals.inc" #include "finish.inc" #include "math.inc" #include "automobile_bug.inc" #include "mrg_misc3.inc" /* ; Persistence Of Vision raytracer version 3.5 sample file. Antialias=on Antialias_Threshold=0.3 Antialias_Depth=3 Input_File_Name=car_banked_10_05.pov Initial_Frame=1 Final_Frame=400 Initial_Clock=0 Final_Clock=5 Cyclic_Animation=on Pause_when_Done=off +FC */ global_settings { max_trace_level 10 ambient_light rgb<1, 1, 1> } //light_source { <4,4, -5> color White} light_source { <0,+40, -50>*10 color rgb <1,.8,.6>} #declare lclock=clock+0.0; #declare crot=10+77*trans((lclock-1)/.5)-87*trans((lclock-2.5)/.5)+10*trans((lclock-4)/.5); #declare cscale=10; #declare cpos= vrotate(<0, 0 ,-80*cscale>,x*crot)+2.5*y; camera { location cpos look_at <0,1,0> angle 34/cscale } #declare dangle=-lclock*360; #declare rangle=lclock*2*pi; #declare courserad=16; #declare coursewidth=5; #declare xnow=-courserad*cos(rangle); #declare znow=-courserad*sin(rangle); #declare bangle = 30; #declare brangle = bangle*pi/180; #declare h=coursewidth*tan(brangle); //arrow #declare arrow=merge{ cylinder{<0,0,0>,<.6,0,0>,.05} cone { <.6, 0, 0>, .2, <1, 0, 0>, .0000001 } } //car location #declare centerbug= vrotate(y*h/2-x*(courserad),y*dangle); #declare vcenter= vrotate(y*(h-.2)-x*(courserad-.6),y*dangle); //vectors #declare vscale=10; #declare wvec=-y*vscale; //everything else is determined relative to weight #declare Nvecy=vlength(wvec); #declare Nvech=vrotate(Nvecy*tan(radians(bangle))*x,y*dangle); //normal is perp to surface #declare Nvec=Nvecy*y+Nvech; #declare Fvec=Nvech; #declare post = .15; #declare head=6*post; #declare hddm=3*post; object{ Make_Vector(Nvec,head,post,hddm) pigment{ color rgb <.0,1,.0> } finish { phong 0 phong_size 20 ambient 3 diffuse 0} no_shadow no_reflection translate vcenter } #declare Nlabel=text { ttf "timrom.ttf" "N" .005, 0 scale 2.2 pigment{ color rgb <.2,1,.2> } finish { phong .2 phong_size 20 ambient 1.2 } no_shadow no_reflection }; #declare NLpos= vcenter+Nvec+.2*y; object{orient_object(Nlabel,NLpos,cpos)} object{ Make_Vector(Fvec,head,post,hddm) pigment{ color <.7,.2,0>*.6 } finish { phong .8 phong_size 200 ambient 5 } no_shadow no_reflection translate vcenter } #declare Flabel=text { ttf "timrom.ttf" "Fnet" .005, 0 scale 2.2 pigment{ color Orange } finish { phong .8 phong_size 200 ambient 1 } no_shadow no_reflection }; #declare FLpos= vcenter+Fvec*1.1; object{orient_object(Flabel,FLpos,cpos)} object{ Make_Vector(wvec,head,post,hddm) pigment{ color Yellow } finish { phong .8 phong_size 200 ambient 3 } no_shadow no_reflection translate vcenter } #declare wlabel=text { ttf "Times" "w" .005, 0 scale 2.2 pigment{ color Yellow } finish { phong 0 phong_size 200 ambient 1 } no_shadow no_reflection }; #declare wLpos= vcenter+wvec*1.15; object{orient_object(wlabel,wLpos,cpos)} object{automobile_bug2 scale 2 rotate -z*bangle //orient for track translate y*h/2-x*courserad //place on track rotate y*dangle //move around track } //normal 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>/cscale } rotate -105*x rotate y*180 } plane { //ground plane y, -.01 texture { pigment { color rgbt <.9,.7,.5,.5> } normal { bumps .2 scale 2.5 } finish { phong .1 phong_size 1500 ambient .8 diffuse .4} } } plane { //no sky color leak through ground plane y, -24 texture { pigment { color rgb <0,0,0> } finish {ambient 0 diffuse 0} } } //track difference{ cylinder { <0, 0, 0>, <0, h, 0>, courserad+coursewidth/2 } cone { <0, -.001, 0>, courserad-coursewidth/2, <0, h+.001, 0>, courserad+coursewidth/2 } texture { pigment { color rgbt <.3,.3,.3,.6> } //normal { bumps 0.25 scale 0.125 } finish { phong .4 phong_size 50 ambient .6 diffuse .0} } no_shadow no_reflection }