// Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.6 // Desc: Basic Scene Example // Date: mm/dd/yy // Auth: ? // #version 3.6; #include "colors.inc" #include "woods.inc" #include "textures.inc" #include "golds.inc" #include "shapes.inc" #include "metals.inc" #include "mrg_misc3.inc" global_settings { assumed_gamma 1.0 } background{color rgb <.6,.6,1>*.4} //timing #declare lclock=clock+0; //clock goes from 0 to 15, for 300 frames #declare t1=trans((lclock-1)/3); #declare t2=trans((lclock-4)/3); #declare t3=trans((lclock-8)/3); #declare t4=trans((lclock-12)/3); // ---------------------------------------- //twisting math //based on K Q_1 = G/(Q_2-Q_1)^2 balance between cable torque and gravitation // reduces to Q_1 (Q_2-Q_1)^2 = c // choose c for "dramatic effect", spreadsheet "cavendish twist profiler.ods" used to preview /* #declare C=9000; #declare v_Q1=1; #declare v_Q2= sqrt(C/v_Q1)+v_Q1; #declare f_Q1_spline = function{ spline { quadratic_spline #while (v_Q1<=12.4) #declare v_Q2= sqrt(C/v_Q1)+v_Q1; #declare v_Q1=v_Q1*1.05; v_Q2, #end } } #declare f_Q1=function(xx){f_Q1_spline(xx).x}; #declare Q2_min=37; #declare Q2_max=75;//Q2 max is 75 */ //phenomenological model, just matching overl twist behavior #declare f_Q1=function(xx){150*exp(-.11*xx)}; #declare Q2_min=27.5; #declare Q2_max=75;//Q2 max is 75 #declare Q2=Q2_max+t2*(Q2_min-Q2_max)+t4*(Q2_max-Q2_min); #declare Q1=f_Q1(Q2); #declare cpos1= <-2, 2.75, -4.0>*4.3; #declare la1=<0,1,0>; #declare cpos2=<-0,22, -5>; #declare la2=<0.0, 1, -2.5>; #declare cpos=cpos1+t1*(cpos2-cpos1)+t3*(cpos1-cpos2); #declare la=la1+t1*(la2-la1)+t3*(la1-la2); camera { location cpos // location <-1, 0.15, -3.0>*5.3 direction 1.5*z right x*image_width/image_height look_at la } // An area light (creates soft shadows) // WARNING: This special light can significantly slow down rendering times! light_source { 0*x // light's position (translated below) color rgb .6 // light's color area_light <15, 0, 0> <0, 0, 15> // lights spread out across this distance (x * z) 5, 5 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... //jitter // adds random softening of light circular // make the shape of the light circular orient // orient light translate <40, 80, -40>*5 // position of light } // ---------------------------------------- plane { y, -1 pigment { color rgb <0.7,0.5,0.3>*.3 } } #declare bball=sphere { 0.0, 1 texture { pigment { granite color_map { [0.00 color rgb .1 ] [0.33 color rgb .2 ] [0.66 color rgb .1 ] [1.00 color rgb .2 ] } turbulence .5 scale .5 } finish{ specular 0.2 diffuse .1 ambient .1 } } normal{granite .2 turbulence .5 scale .5} } #declare bball_sep=4; #declare bball_p=union{ object{bball } cylinder{-.5*y,-1.51*y,.2 texture{T_Wood26 rotate x*90 translate x scale 2.5} } } union{ union{ cylinder{0,-.1*y,.4 translate bball_sep*x} cylinder{0,-.1*y,.4 translate -bball_sep*x} box{-bball_sep*x-.4*z,bball_sep*x+.4*z-.1*y} texture{T_Wood26 rotate y*90 translate x scale 5.5} } object{bball_p translate bball_sep*x+1.5*y} object{bball_p rotate y*90 translate -bball_sep*x+1.5*y} rotate y*Q2 } #declare lball=sphere { 0.0, .35 texture { pigment { granite color_map { [0.00 color rgb .1 ] [0.33 color rgb .2 ] [0.66 color rgb .1 ] [1.00 color rgb .2 ] } turbulence .5 scale .5 } finish{ specular 0.2 diffuse .1 ambient .1 } } normal{granite .2 turbulence .5 scale .5} } union{ object{lball translate -bball_sep*x} object{lball translate +bball_sep*x} cylinder{-bball_sep*x,bball_sep*x,.051 texture{T_Wood26 rotate y*90 translate y scale 1} } cylinder{-.06*z,.06*z,0.3 //texture{T_Chrome_5A} texture{ pigment{color rgb .1} finish{reflection .951 specular .1 diffuse .1 ambient .1} } } cylinder{0,5*y,.025 texture{pigment{color rgb .2}} } translate y*1.5 rotate Q1*y } //base #declare basecolor=<.2,.4,0.8>; #declare basetexture= texture { pigment { granite color_map { [0.00 color rgb .35*basecolor ] [0.33 color rgb .5*basecolor ] [0.66 color rgb .35*basecolor ] [1.00 color rgb .5*basecolor ] } turbulence 1.5 scale .25 } finish{ specular 0.2 diffuse .052 ambient .2 } } union{ cone{0,1.5,.25*y,1.35 texture {basetexture} normal{granite .15 turbulence 1.5 scale .25} } cylinder{0,1.01*y,.125 texture{Brushed_Aluminum rotate z*90 scale 1} } translate -1.*y } //suspension #declare tribase=union{ cylinder{0,.5*y,.25} cylinder{0,.3*y,.125 translate -2*z} box{-.05*x,.05*x+.2*y-2*z} cylinder{0,.3*y,.125 translate -2*z rotate y*120} box{-.05*x,.05*x+.2*y-2*z rotate y*120} cylinder{0,.3*y,.125 translate -2*z rotate -y*120} box{-.05*x,.05*x+.2*y-2*z rotate -y*120} texture {basetexture} normal{granite .15 turbulence 1.5 scale .25} } #declare rod_connecter=union{ cylinder{0,1*y,.2} cylinder{-.5*z,.5*z,.2 translate .5*y-.3*x} texture {basetexture} normal{granite .15 turbulence 1.5 scale .25} } union{ object{tribase} cylinder{0,8*y,.125 texture{Brushed_Aluminum rotate z*90 scale 1} } object{rod_connecter translate 7*y} cylinder{2*z,-7.5*z,.125 texture{Brushed_Aluminum rotate -y*90 scale 1} translate 7.5*y-.3*x } object{rod_connecter translate 7.*y-6.5*z} translate 6.5*z-y } //beam difference{ union{ //dot cylinder { .05*y,-.5*y,1 texture { pigment { // (---surface color---) cylindrical // some pattern color_map { // color map [0.1 color rgbt <1,0,0,1>] [0.5 color rgb <1,0,0>] } } finish { ambient 2 specular 0.0 } } rotate x*90 scale .1*<.3,.3,.1> translate 1.5*y-9*z rotate 2*y*Q1 no_shadow no_reflection } //beams union{ cylinder{0,-7*z,.02 translate 1.5*y no_reflection no_shadow pigment{color rgb <2,.0,.0>} } cylinder{0,-9*z,.02 translate 1.5*y no_reflection no_shadow pigment{color rgb <2,.0,.0>} rotate 2*Q1*y } translate -.06*z } } //remove reflected beam when blocked by laser housing cone{-6.5*z,.3,-10*z,.3*10/6.5 translate 1.5*y} } cylinder{z,-z,.3 translate 1.5*y-7.5*z texture{ pigment{color rgb 1} finish{ specular .4 diffuse .3 ambient .3 phong 5 phong_size 0.75} } } union{ cone{0,1.5,.25*y,1.35 texture {basetexture} normal{granite .15 turbulence 1.5 scale .25} } cylinder{0,2.6*y,.125 texture{Brushed_Aluminum rotate z*90 scale 1} } translate -1.*y-7.5*z } //screen and stand union{ object{tribase rotate y*60} cylinder{0,2.45*y,.125 texture{Brushed_Aluminum rotate z*90 scale 1} } translate -9*z-y rotate y*20 } intersection{ Wedge(40) difference{ cylinder{0,.25*y,9.03} cylinder{-y,y,8.99} translate 1.375*y } rotate y*180 texture{ pigment{color rgbt <.9,.9,.9,.85>} finish{ specular .4 diffuse .3 ambient .3 } } }