User:Tom Allen/ta/AddendumX00P04

From J Wiki
Jump to: navigation, search


gX0=:,:@(1.5 1 2 8 1 1 1 _1 0 0"_)

vSgDd2=:''([-@([(0{])@E1cn yRef@([hkxX00B zfxc"_ 1)),:@(S03yH{]))]

Initx =:  1.03 , 0.5p1 , 0.25p1   , 0p1       "_
Initdx=: (0    , 0     , 0.000625 , 0.00066248"_)*%@InitInt=:1"_

Inity =:zfyc@Initx
Initdy=:zfyc@(Initx+Initdx)+-@zfyc@Initx

NB. ... 'ds' is defined by the first interval of the integration as in flat spacetime ...

Initds=:|@((((0{])^2:)+((1{])^2:)+((2{])^2:)+-@((3{])^2:))^0.5"_)@Initdy

vS00yL   =:Inity
vS01dyL  =:0,0,0,0:
vS02d1L  =:Initdy%Initds
vS06ds   =:Initds
vS07count=:(0,9269"_)*InitInt
pdDQ     =:vSgD@vS''

pdDQ arrayPut   'pdDQ'
     arrayClose 'pdDQ'


NB. ... execute (ijx) ...

               arrayOpen  'pdDQ'
pdDQ=:9270 8 4 arrayGet   'pdDQ'   NB. ... shape required ...
               arrayClose 'pdDQ'


load 'plot'

pd 'reset'

pd ((1.03*cos@]"0);1.03*sin@]"0) pTsteps _ 0p1 2p1 160

pd <"1@(0|:])@:((cy0,cy1)@(S00yL{])"2) (i.@(9269"_){]) pdDQ

pd 'aspect 1'
pd 'pdf'


... path of the electromagnetic wave (blue) ...
... a geodesic once around (red) ...


JX00P0400H.jpg


NB. ... execute (ijx) ...

NB. ... spacetime coordinates start/end geodesic ...
   
   ((cos@(0.25p1"_)*1.03"_),(sin@(0.25p1"_)*1.03"_),0,0:)''
0.72832 0.72832 0 0
   
   ((2^_44)qtsz])@(0{])@{: (i.@(9269"_){]) pdDQ
0.728533 0.728212 0 6.37323


load 'plot'

pd 'reset'

incy0=:(2-~/\])@:(cy0"1)
incy1=:(2-~/\])@:(cy1"1)
incy2=:(2-~/\])@:(cy2"1)
incy3=:(2-~/\])@:(cy3"1)
veloc=:(((incy0^2:)+incy1^2:)^0.5"_)%incy3

pd (((S06ds{])*i.@(S0700nmbr{]))@{:;veloc@:((S00yL{])"2)) (i.@(9269"_){]) pdDQ
pd (((S06ds{])*i.@(S0700nmbr{]))@{:;incy2@:((S00yL{])"2)) (i.@(9269"_){]) pdDQ

pd 'pdf'


... velocity of geodesic (blue) plotted against length (ds) ...


JX00P0401I.jpg


...
... the length of the path of an electromagnetic wave from an origin is the elapsed time at the endpoint of the path ...
...