Attachment 'magf05.pov'

Download

   1 // magf05.pov
   2 // rotate around x axis
   3 
   4 #declare  starscale =  200              ;
   5 #declare  starsize  =  0.003            ;
   6 
   7 #include "colors.inc"
   8 #include "screen.inc"
   9 #include "shapes.inc"
  10 #include "meter.inc"
  11 #include "earth1.inc"
  12 #include "starmap1.inc"
  13 
  14 #declare  rad = 3.141593265/180.0 ;
  15 
  16 #declare  L2_half = 0.5*2.0             ;
  17 #declare  L1_half = 0.5*1.1             ;
  18 
  19 // dipole angular direction components
  20 #declare  angl_n  = 10.26               ; // degrees
  21 #declare  angl_e  = 71.78-180           ; // degrees ( to west )
  22 
  23 // angular dipole displacement components
  24 #declare  offs_r  = 552.0*KM/R_Earth    ; // normalized to 1 RE
  25 #declare  offs_n  = 22.2*rad            ; // degrees to radians
  26 #declare  offs_e  = (180.0-141.6)*rad   ; // degrees to radians
  27 
  28 // find Cartesian displacement components
  29 #declare  offs_h  = offs_r*cos(offs_n)  ;
  30 #declare  offs_x  = offs_h*sin(offs_e)  ;
  31 #declare  offs_y  = offs_r*sin(offs_n)  ;
  32 #declare  offs_z  = offs_h*cos(offs_e)  ;
  33 
  34 // server sky
  35 #declare  m288    = 12789.0*KM/R_Earth  ;
  36 
  37 //---------------------------------------------------------------------------
  38 
  39 Set_Camera_Location ( <   0.0,   2.0, -10.0 > )
  40 Set_Camera_Look_At  ( <   0.0,   0.0,   0.0 > )
  41 Set_Camera_Angle    ( 25.0 )
  42 
  43 light_source{ < -10.0,  0.0, -50.0 > color     White }
  44 
  45 //---------------------------------------------------------------------------
  46 
  47 #declare  magfield = color rgbt < 1.0, 1.0, 0.0, 0.8 > ;
  48 
  49 // squash torus to approximate McIlwain sin()^2
  50 #declare  magv     = sqrt( 1.0 / ( sqrt( 8.0 ) - 1 ) ) ; 
  51 
  52 #declare earthfield = union {
  53    union {
  54       object   { earth1 rotate -90*y }
  55       cylinder { -1.100*y, 1.100*y, 0.010 texture { pigment { color <1,0,0> }}}
  56       cylinder { -0.002*y, 0.002*y, 1.003 texture { pigment { color <1,0,0> }}}
  57       cylinder { -0.002*z, 0.002*z, 1.003 texture { pigment { color <0,0,1> }}}
  58       cylinder { -0.002*x, 0.002*x, 1.003 texture { pigment { color <1,1,1> }}}
  59 
  60       // longitude and latitude
  61       #declare  lat = -80.0*rad ;
  62       #while( lat < 81.0*rad )
  63          #declare sm    = sin(lat) - 0.001 ;
  64          #declare sp    = sin(lat) + 0.001 ;
  65          #declare cp    = cos(lat) + 0.001 ;
  66          // #debug concat( str(lat,8,1), str(sp,8,4), str(cp,8,4), "\n" ) 
  67          cylinder { sm*y, sp*y, cp texture { pigment { color <0.5,0.5,0.5> }}}
  68          #declare lat = lat + 10.0*rad  ;
  69       #end
  70 
  71       #declare  long = 0 ;
  72       #while( long < 180 ) 
  73          cylinder { -0.002*x, 0.002*x, 1.002
  74                      texture { pigment { color <0.5,0.5,0.5> }}
  75                      rotate long*y
  76          }
  77          #declare long = long+10 ;
  78       #end
  79    }
  80    union {
  81       difference {
  82          torus { L2_half, L2_half }
  83          torus { L1_half, L1_half }
  84          texture { pigment { color magfield }
  85                    finish  { ambient 0.9 diffuse 0.2 } }
  86          scale < 1.0, magv, 1.0 >
  87       }
  88       cylinder { -1.1*y, 1.1*y, 0.01 texture { pigment { color <1,1,0> } } }
  89       rotate    angl_n * x
  90       rotate    angl_e * y
  91       translate < offs_x , offs_y, offs_z >
  92    }
  93 
  94    object { torus { m288, 0.002 }
  95             texture { pigment { color <1,1,1> }
  96                       finish  { ambient 1.0 diffuse 0.0 } }
  97             // rotate 90*x 
  98    }
  99 }
 100 
 101 object { earthfield rotate -clock*y }   // 0, 45, 90, 135 ... 315
 102 union  { AllStars( White ) }

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2013-08-27 23:08:07, 12.8 KB) [[attachment:M288ash.png]]
  • [get | view] (2012-05-11 02:55:12, 9.8 KB) [[attachment:M288sh.png]]
  • [get | view] (2012-05-11 02:55:45, 2.0 KB) [[attachment:XXXXX.gp]]
  • [get | view] (2013-08-27 23:08:39, 2.2 KB) [[attachment:XXXXX3.gp]]
  • [get | view] (2010-08-04 23:36:48, 4.3 KB) [[attachment:ll02.c]]
  • [get | view] (2010-08-04 23:37:01, 1.7 KB) [[attachment:ll02.gp]]
  • [get | view] (2012-05-11 02:55:30, 5.2 KB) [[attachment:ll288.c]]
  • [get | view] (2013-08-27 23:07:49, 6.1 KB) [[attachment:ll288a.c]]
  • [get | view] (2010-08-04 23:33:20, 9.6 KB) [[attachment:lshell.png]]
  • [get | view] (2010-08-04 23:46:23, 0.4 KB) [[attachment:magf05.ini]]
  • [get | view] (2010-08-04 23:45:51, 3.3 KB) [[attachment:magf05.pov]]
  • [get | view] (2010-07-14 07:05:03, 2116.1 KB) [[attachment:magf05d.swf]]
  • [get | view] (2010-08-04 23:49:42, 12416.1 KB) [[attachment:povinc.tar.gz]]
 All files | Selected Files: delete move to page

You are not allowed to attach a file to this page.