// 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.6; #declare trns = function(tt) { (1-cos(pi*max(min(tt,1),0)))/2 } // spacing #declare dx_loops=10-9.5*trns((lclock-.1)/.8); #declare nloops = 15; //draw the field lines #declare maxlen=14; #declare fla=union{ #declare yn=0; #while(yn<1) //vary the starting point (where on y axis) #declare lfl=0; //field line drawing parameters #declare dlfl=.05; //incremental length of field line #declare fl1=yn*y; #while (lfl0 ) #declare lfl = maxlen; #end #end #declare yn=yn+.2; #end } #declare daloops= union{ #declare xloop=-(nloops-1)/2*dx_loops; #while (xloop<=(nloops-1)/2*dx_loops) torus { 1, 0.05 rotate z*90 translate xloop*x} #declare xloop=xloop+dx_loops; #end } #declare mrg_blue_texture= texture { pigment { // (---surface color---) color rgb <.1,.1,.8> } finish { // (---surface finish---) ambient 1.0 specular 0.0 // no shiny } } #declare mrg_green_texture= texture { pigment { // (---surface color---) color rgb <.1,.7,.1> } finish { // (---surface finish---) ambient 1.0 specular 0.0 // no shiny } } object{daloops texture{mrg_blue_texture} no_shadow no_reflection} object{fla texture{mrg_green_texture} no_shadow no_reflection} object{flb texture{mrg_green_texture} no_shadow no_reflection} object{fla texture{mrg_green_texture} scale <1,-1,1> no_shadow no_reflection} object{flb texture{mrg_green_texture} scale <1,-1,1> no_shadow no_reflection} camera { // location (1-trns((lclock-.2)/.6))*<25,15, -35.0>+trns((lclock-.2)/.6)*<2,5, -15.0> location <10,0, -35.0>*4 // location <0,15, 0>*4 right x*image_width/image_height look_at <0.0, 0.0, 0.0> angle 25/5 }