// Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.5 // Desc: Basic Scene Example // Date: mm/dd/yy // Auth: ? // #version 3.5; #include "colors.inc" // general math functions and macros // #include "math.inc" #include "golds.inc" #include "metals.inc" #include "textures.inc" global_settings { assumed_gamma 1.0 } #declare fl_txt=texture{pigment{Flesh}}; #declare gl_txt=texture{T_Gold_5B}; #declare sl_txt=texture{T_Chrome_4A}; #declare transitor=function(tt,tt0,dtt) { .5*(1-cos(min(max(tt-tt0,0),dtt)/dtt*pi))} #declare lclock=min(clock+1,1.0); #declare p1t=transitor(lclock,.1,.3); // bring hand in #declare p1tb=transitor(lclock,.3,.1); // extend thumb #declare p2t=transitor(lclock,.4,.3); // curl fingers #declare p3t=transitor(lclock,.6,.3); // uncloak b field // hand parameters #declare ta=(1-p1tb)*50; //thumb curl-in angle angle #declare phnd= <5,-1,-3>*.9*(1-p1t); //bring in hand #declare fa=65*p2t; //finger "curl" angle #declare ahnd = 50; //orient hand #declare ra=75; #declare la=75; #declare palm_height = 1; #declare palm_width = .8; #declare palm_depth = .2; #declare pv=; //THUMB #declare tay1=ta/4; //angle in degrees for first thumb joint manipulation strictly a rotation about vertical // axis thru center of hand #declare tae1=45+15*(75-ta)/75;//"extension angle" of thumb from vertical #declare tax2=ta; //bend in first external joint #declare tax3=ta; //bend in second external joint #declare tae3=20*(75-ta)/75; //additional extension angle at last joint //lengths of thumb segments #declare tl1=sqrt(palm_width*palm_width+palm_height*palm_height)/2*1.0; #declare tl2=tl1*.3; #declare tl3=tl2*.75; //widths of thumb segments #declare tw1=palm_depth*.5; #declare tw2=tw1*.8; #declare tw3=tw2*1.0; #declare tp1=<0,0,0>; //base of first thumb segment ("imbeded" in palm) #declare tp2=vrotate(vrotate(tl1*y,-tae1*z),tay1*y); #declare tp1=.2*tp2; #declare tp3=vrotate(tl2*y,-tax2*x)+tl1*y; #declare tp3=vrotate(vrotate(tp3,-tae1*z),tay1*y); #declare tpend=vrotate(vrotate(tl3*y,-tae3*z),-tax3*x)+tl2*y; #declare tpend=vrotate(tpend,-tax2*x)+tl1*y; #declare tpend=vrotate(vrotate(tpend,-tae1*z),tay1*y); //Pointer #declare paa=fa; #declare pa1=paa; //first joint bend #declare pa2=paa; //2nd joint bend #declare pa3=paa; //3rd joint bend #declare pl1=palm_height/3; //length of first segment #declare pl2=pl1; //length of 2nd segment #declare pl3=pl2; //length of 3rd segment #declare pp1= palm_width*3/8*x+palm_height*y; #declare pp2= vrotate(pl1*y,-pa1*x)+pp1; #declare pp3= vrotate(pl2*y,-pa2*x)+pl1*y; #declare pp3= vrotate(pp3,-pa1*x)+pp1; #declare pp4= vrotate(pl3*y,-pa3*x)+pl2*y; #declare pp4= vrotate(pp4,-pa2*x)+pl1*y; #declare pp4= vrotate(pp4,-pa1*x)+pp1; #declare pw=palm_depth/2; //middle #declare ma1=fa; //first joint bend #declare ma2=fa+0; //2nd joint bend #declare ma3=fa+0; //3rd joint bend #declare ml1=palm_height/3*1.1; //length of first segment #declare ml2=ml1; //length of 2nd segment #declare ml3=ml2; //length of 3rd segment #declare mp1= palm_width*1/8*x+palm_height*y; #declare mp2= vrotate(ml1*y,-ma1*x)+mp1; #declare mp3= vrotate(ml2*y,-ma2*x)+ml1*y; #declare mp3= vrotate(mp3,-ma1*x)+mp1; #declare mp4= vrotate(ml3*y,-ma3*x)+ml2*y; #declare mp4= vrotate(mp4,-ma2*x)+ml1*y; #declare mp4= vrotate(mp4,-ma1*x)+mp1; #declare mw=palm_depth/2; //ring #declare ra1=fa; //first joint bend #declare ra2=fa; //2nd joint bend #declare ra3=fa; //3rd joint bend #declare rl1=palm_height/3*1; //length of first segrent #declare rl2=rl1; //length of 2nd segrent #declare rl3=rl2; //length of 3rd segrent #declare rp1= -palm_width*1/8*x+palm_height*y; #declare rp2= vrotate(rl1*y,-ra1*x)+rp1; #declare rp3= vrotate(rl2*y,-ra2*x)+rl1*y; #declare rp3= vrotate(rp3,-ra1*x)+rp1; #declare rp4= vrotate(rl3*y,-ra3*x)+rl2*y; #declare rp4= vrotate(rp4,-ra2*x)+rl1*y; #declare rp4= vrotate(rp4,-ra1*x)+rp1; #declare rw=palm_depth/2; //little (pinkie) #declare la1=fa; //first joint bend #declare la2=fa; //2nd joint bend #declare la3=fa; //3rd joint bend #declare ll1=palm_height/3*.9; //length of first seglent #declare ll2=ll1; //length of 2nd seglent #declare ll3=ll2; //length of 3rd seglent #declare lp1= -3*palm_width*1/8*x+palm_height*y; #declare lp2= vrotate(ll1*y,-la1*x)+lp1; #declare lp3= vrotate(ll2*y,-la2*x)+ll1*y; #declare lp3= vrotate(lp3,-la1*x)+lp1; #declare lp4= vrotate(ll3*y,-la3*x)+ll2*y; #declare lp4= vrotate(lp4,-la2*x)+ll1*y; #declare lp4= vrotate(lp4,-la1*x)+lp1; #declare lw=palm_depth/2; union{ difference{ box{-pv/2,pv/2 translate y*palm_height/2 texture{sl_txt}} //palm box{-x-z-0*y,+x+z-y rotate z*45} texture{sl_txt}} cylinder{tp1, tp2, tw1 texture{sl_txt}} //lower thumb cylinder{tp2, tp3, tw2 texture{sl_txt}} //middle thumb cylinder{tp3, tpend, tw3 texture{sl_txt}} //tip of thumb sphere{tpend,tw3 texture{sl_txt}} sphere{ tp1,tw1*1 texture{gl_txt}} sphere{ tp2,tw2*1.2 texture{gl_txt}} sphere{ tp3,tw3*1.2 texture{gl_txt}} cylinder{pp1, pp2, pw texture{sl_txt}} //pointer 1 cylinder{pp2, pp3, pw texture{sl_txt}} //pointer 2 cylinder{pp3, pp4, pw texture{sl_txt}} //pointer 3 sphere{ pp1,pw*1.2 texture{gl_txt}} sphere{ pp2,pw*1.2 texture{gl_txt}} sphere{ pp3,pw*1.2 texture{gl_txt}} sphere{ pp4,pw*1 texture{sl_txt}} cylinder{mp1, mp2, mw texture{sl_txt}} //middle 1 cylinder{mp2, mp3, mw texture{sl_txt}} //middle 2 cylinder{mp3, mp4, mw texture{sl_txt}} //middle 3 sphere{ mp1,mw*1.2 texture{gl_txt}} sphere{ mp2,mw*1.2 texture{gl_txt}} sphere{ mp3,mw*1.2 texture{gl_txt}} sphere{ mp4,mw*1 texture{sl_txt}} cylinder{rp1, rp2, rw texture{sl_txt}} //ring 1 cylinder{rp2, rp3, rw texture{sl_txt}} //ring 2 cylinder{rp3, rp4, rw texture{sl_txt}} //ring 3 sphere{ rp1,rw*1.2 texture{gl_txt}} sphere{ rp2,rw*1.2 texture{gl_txt}} sphere{ rp3,rw*1.2 texture{gl_txt}} sphere{ rp4,rw*1 texture{sl_txt}} cylinder{lp1, lp2, lw texture{sl_txt}} //little 1 cylinder{lp2, lp3, lw texture{sl_txt}} //little 2 cylinder{lp3, lp4, lw texture{sl_txt}} //little 3 sphere{ lp1,lw*1.2 texture{gl_txt}} sphere{ lp2,lw*1.2 texture{gl_txt}} sphere{ lp3,lw*1.2 texture{gl_txt}} sphere{ lp4,lw*1 texture{sl_txt}} //texture{fl_txt} translate -.5*y rotate z*90 //translate -.0*y rotate y*ahnd translate +.1*z+.3*x+phnd } #macro make_arrow(draw_vector,arrow_cap_length,arrow_cap_width,arrow_width) #local vector_length=vlength(draw_vector); union{ #if(vector_length<= arrow_cap_length) //cone { <0, 1, 0>, 0.0, <0, -1, 0>, 1.0 } cone{0*x,vector_length/arrow_cap_length*arrow_cap_width,draw_vector,0} #else cone{draw_vector*(vector_length-arrow_cap_length)/vector_length,arrow_cap_width,draw_vector,0} cylinder{0*x,draw_vector*(vector_length-arrow_cap_length)/vector_length,arrow_width} #end } #end union{ object{make_arrow(.5*y,.4,.10,.025) translate -.25*y } object{make_arrow(.5*y,.4,.10,.025) translate -1.75*y } object{make_arrow(.5*y,.4,.10,.025) translate 1.75*y } cylinder{-5*y,5*y,.025} texture { pigment { // (---surface color---) color rgb <.0,0,3> } finish { // (---surface finish---) ambient 1.0 specular 0.04 // shiny } } no_shadow no_reflection} //b field lines #declare bring=merge{ torus{2,.025 } object{make_arrow(.4*x,.4,.10,.025) translate -2*z } object{make_arrow(.4*x,.4,.10,.025) translate -2*z rotate y*90} object{make_arrow(.4*x,.4,.10,.025) translate -2*z rotate y*180} object{make_arrow(.4*x,.4,.10,.025) translate -2*z rotate y*270} torus{1,.025 } object{make_arrow(.4*x,.4,.10,.025) translate -1*z } object{make_arrow(.4*x,.4,.10,.025) translate -1*z rotate y*90} object{make_arrow(.4*x,.4,.10,.025) translate -1*z rotate y*180} object{make_arrow(.4*x,.4,.10,.025) translate -1*z rotate y*270} texture { pigment { // (---surface color---) color rgbt <1,0,0,.7+.3*(1-p3t)> } finish { // (---surface finish---) ambient 1.0 specular 0.00 // shiny } } no_shadow no_reflection } union{ object{bring } object{bring translate 1.75*y } object{bring translate -1.75*y} rotate -40*y } // WARNING: This special light can significantly slow down rendering times! light_source { 0*x // light's position (translated below) color rgb <.8, .4, .3> // light's color area_light <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z) 4, 4 // 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, 30, -50> // position of light } #declare csc=5; camera { location <-.51, 2, -5>*csc direction 1.5*z right x*image_width/image_height look_at <0.5,.2, 0.0> angle 70/csc } // create a TrueType text shape text { ttf // font type (only TrueType format for now) "times.ttf", // Microsoft Windows-format TrueType font file name "I", // the string to create .03, // the extrusion depth 0 // inter-character spacing texture { pigment { // (---surface color---) color rgb <.0,0,3> } finish { // (---surface finish---) ambient 1.0 specular 0.04 // shiny } } scale .45 translate .125*x-2.15*y no_shadow no_reflection} text { ttf // font type (only TrueType format for now) "times.ttf", // Microsoft Windows-format TrueType font file name "B", // the string to create .03, // the extrusion depth 0 // inter-character spacing texture { pigment { // (---surface color---) color rgbt <1,0,0,.7+.3*(1-p3t)> } finish { // (---surface finish---) ambient 1.0 specular 0.00 // shiny } } scale .45 translate -2.3*x-.2*y no_shadow no_reflection}