User:Tom Allen/ta/AddendumX04P06A

From J Wiki
Jump to navigation Jump to search


uQ0=:,:@(1 1 2 8 1 1 1 _0.5 0"_)

vSgDd2=:uQ0([-@([(0{])@E1cn yRef@hkyX04A),:@(S03yH{]))]

Initx =:  1.0783 , 0.5p1 , 0.25p1 , 0p1 "_
Initdx=: (0      , 0     , 0.01   , 0.02"_)*%@InitInt=:128"_

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

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,10000"_)*InitInt
pdDA     =:vSgD@vS''

pdDA arrayPut   'pdDA'
     arrayClose 'pdDA'

Initx =:  1.2000 , 0.5p1 , 0.25p1 , 0p1 "_
Initdx=: (0      , 0     , 0.01   , 0.02"_)*%@InitInt=:128"_

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

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,10000"_)*InitInt
pdDB     =:vSgD@vS''

pdDB arrayPut   'pdDB'
     arrayClose 'pdDB'

Initx =:  0.9700 , 0.5p1 , 0.25p1 , 0p1 "_
Initdx=: (0      , 0     , 0.01   , 0.02"_)*%@InitInt=:128"_

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

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,10000"_)*InitInt
pdDC     =:vSgD@vS''

pdDC arrayPut   'pdDC'
     arrayClose 'pdDC'


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

                  arrayOpen  'pdDA'
pdDA=:1280001 8 4 arrayGet   'pdDA'   NB. ... shape required ...
                  arrayClose 'pdDA'

                  arrayOpen  'pdDB'
pdDB=:1280001 8 4 arrayGet   'pdDB'   NB. ... shape required ...
                  arrayClose 'pdDB'

                  arrayOpen  'pdDC'
pdDC=:1280001 8 4 arrayGet   'pdDC'   NB. ... shape required ...
                  arrayClose 'pdDC'


load 'plot'

pd 'reset'

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

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

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

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

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

pd 'aspect 1'
pd 'pdf'


JX04P06A00C.jpg
... once around for pdDA pdDB pdDC ...


load 'plot'

pd 'reset'

pd (cy3"1;(((cy0^2:)+(cy1^2:)+cy2^2:)^0.5"_)"1)@:((S00yL{])"2) ((0+i.@(91100"_)){]) pdDA

pd 'show'


JX04P06A01C.png