// Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.6 // Desc: scence template // Date: 10/06/04 // Auth: mrg // #version 3.5; #include "colors.inc" // general math functions and macros // #include "math.inc" global_settings { assumed_gamma 1.2 ambient_light color rgb <1,1,1> } background { color rgb <.05, 0.05, 0.05> } #declare ds=1/16; //the basic current element #declare lx = function(ss) {0} #declare ly = function(ss) {1*sin(2*pi*ss)} #declare lz = function(ss) {1*cos(2*pi*ss)} //and ancillaries for the current #declare dlx = function(ss) { lx(ss+ds)-lx(ss) } #declare dly = function(ss) { ly(ss+ds)-ly(ss) } #declare dlz = function(ss) { lz(ss+ds)-lz(ss) } #declare lavx = function(ss) { (lx(ss+ds)+lx(ss))*.5 } #declare lavy = function(ss) { (ly(ss+ds)+ly(ss))*.5 } #declare lavz = function(ss) { (lz(ss+ds)+lz(ss))*.5 } //Bield for one loop at r_fp rel to loop's orign #macro BL1(rfpt) #local sl = 0; #declare BL1_ans = 0; #while(sl<1) #local rloc=rfpt-; //from sourcept to field pt #local dlloc=; #declare BL1_ans=BL1_ans-vcross(dlloc,rloc)*pow(vlength(rloc),-3); #local sl=sl+ds; #end #end #declare lclock=clock+0.0; #declare trns = function(tt) { (1-cos(pi*max(min(tt,1),0)))/2 } #declare e1 = trns((lclock-.1)/.8); //draw the field lines #declare maxlen=45; #declare nlines = 3; #declare blines = array[nlines]; #declare bdirs = array[nlines]; #declare ycount=1; //skip center, we know its a straight line #declare dy=1/nlines; #while(ycount} object{bdirs[ycount] rotate x*(sc/rnum*360+mod(ycount,2)*360/rnum)} cone{0,.125,dlfl*5*x,0 translate 1*x} cone{0,.125,dlfl*5*x,0 translate -1*x} #declare sc=sc+1; #end #declare ycount=ycount+1; #end object{blines[0] } object{blines[0] scale <-1,1,1>} texture { pigment { // (---surface color---) color rgb <.1,.7,.1> } finish { // (---surface finish---) ambient 1.0 specular 0.0 // no shiny } } } #declare mrg_blue_texture= texture { pigment { // (---surface color---) color rgb <.1,.1,.8> } finish { // (---surface finish---) ambient 1.0 specular 0.0 // no shiny } } object{allines rotate z*90 no_shadow no_reflection} union{ torus {1, 0.05 } cone{0,.125,dlfl*5*z,0 translate x} cone{0,.125,dlfl*5*z,0 translate x rotate y*90} cone{0,.125,dlfl*5*z,0 translate x rotate y*180} cone{0,.125,dlfl*5*z,0 translate x rotate -y*90} rotate y*45 texture{mrg_blue_texture} no_shadow no_reflection} #declare cstart= <-5,12, -20.0>*2; #declare cend= <+25,2, -40.0>; camera { location e1*cend+(1-e1)*cstart right x*image_width/image_height look_at <0.0, 0.0, 0.0> angle 10 }