User:Tom Allen/ta/AddendumX02P05

From J Wiki
Jump to navigation Jump to search


bV0=:0.05 1 2 8 1 1 1 _1 0,:0"_

vSgDd2=:bV0([([(0{])@E1cn zRef@([hkyX02D bVyc"_ 1)),:@(S03yH{]))]

Initx =:  0.7500 , 0.5p1 ,  0.25p1 , 0p1"_
Initdx=: (0      , 0     ,  0      , 0.1"_)*%@InitInt=:1"_

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

Initz =:bV0 bVzc Inity
Initdz=:bV0(((0{])+-@vZRv00*(3{])),(1{]),(2{]),(3{]))Initdy

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

vS00yL   =:Initz
vS01dyL  =:0,0,0,0:
vS02d1L  =:Initdz%Initds
vS06ds   =:Initds
vS07count=:(0,10000"_)*InitInt
pdDS4A  =:vSgD@vS''

pdDS4A arrayPut   'pdDS4A'
       arrayClose 'pdDS4A'


bV0=:0.05 1 2 8 1 1 1 _1 0,:_0.01"_

vSgDd2=:bV0([([(0{])@E1cn zRef@([hkyX02D bVyc"_ 1)),:@(S03yH{]))]

Initx =:  0.7500 , 0.5p1 ,  0.25p1 , 0p1"_
Initdx=: (0      , 0     ,  0      , 0.1"_)*%@InitInt=:1"_

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

Initz =:bV0 bVzc Inity
Initdz=:bV0(((0{])+-@vZRv00*(3{])),(1{]),(2{]),(3{]))Initdy

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

vS00yL   =:Initz
vS01dyL  =:0,0,0,0:
vS02d1L  =:Initdz%Initds
vS06ds   =:Initds
vS07count=:(0,10000"_)*InitInt
pdDS4B  =:vSgD@vS''

pdDS4B arrayPut   'pdDS4B'
       arrayClose 'pdDS4B'


bV0=:0.05 1 2 8 1 1 1 _1 0,:_0.90"_

vSgDd2=:bV0([([(0{])@E1cn zRef@([hkyX02D bVyc"_ 1)),:@(S03yH{]))]

Initx =:  0.7500 , 0.5p1 ,  0.25p1 , 0p1"_
Initdx=: (0      , 0     ,  0      , 0.1"_)*%@InitInt=:1"_

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

Initz =:bV0 bVzc Inity
Initdz=:bV0(((0{])+-@vZRv00*(3{])),(1{]),(2{]),(3{]))Initdy

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

vS00yL   =:Initz
vS01dyL  =:0,0,0,0:
vS02d1L  =:Initdz%Initds
vS06ds   =:Initds
vS07count=:(0,10000"_)*InitInt
pdDS4C  =:vSgD@vS''

pdDS4C arrayPut   'pdDS4C'
       arrayClose 'pdDS4C'


bV0=:0.05 1 2 8 1 1 1 _1 0,:_0.95"_

vSgDd2=:bV0([([(0{])@E1cn zRef@([hkyX02D bVyc"_ 1)),:@(S03yH{]))]

Initx =:  0.7500 , 0.5p1 ,  0.25p1 , 0p1"_
Initdx=: (0      , 0     ,  0      , 0.1"_)*%@InitInt=:1"_

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

Initz =:bV0 bVzc Inity
Initdz=:bV0(((0{])+-@vZRv00*(3{])),(1{]),(2{]),(3{]))Initdy

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

vS00yL   =:Initz
vS01dyL  =:0,0,0,0:
vS02d1L  =:Initdz%Initds
vS06ds   =:Initds
vS07count=:(0,10000"_)*InitInt
pdDS4D  =:vSgD@vS''

pdDS4D arrayPut   'pdDS4D'
       arrayClose 'pdDS4D'


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

                  arrayOpen  'pdDS4A'
pdDS4A=:10001 8 4 arrayGet   'pdDS4A'   NB. ... shape required ...
                  arrayClose 'pdDS4A'

                  arrayOpen  'pdDS4B'
pdDS4B=:10001 8 4 arrayGet   'pdDS4B'   NB. ... shape required ...
                  arrayClose 'pdDS4B'

                  arrayOpen  'pdDS4C'
pdDS4C=:10001 8 4 arrayGet   'pdDS4C'   NB. ... shape required ...
                  arrayClose 'pdDS4C'

                  arrayOpen  'pdDS4D'
pdDS4D=:10001 8 4 arrayGet   'pdDS4D'   NB. ... shape required ...
                  arrayClose 'pdDS4D'


load 'plot'

pd 'reset'

bV0=:0.05 1 2 8 1 1 1 _1 0,:_0.01"_

pd (((S06ds{])@{:*i.@{.@$)@];cz0"1@:((S00yL{])"2))                 (i.@(1001"_){]) pdDS4A    NB. ... blue ...

pd (((S06ds{])@{:*i.@{.@$)@];cz0"1@:((S00yL{])"2))                 (i.@(1001"_){]) pdDS4B    NB. ... red ...

pd (((S06ds{])@{:*i.@{.@$)@];cz0"1@(bV0 bVyc"_ 1])@:((S00yL{])"2)) (i.@(1001"_){]) pdDS4B    NB. ... green overwrites blue ...

pd (((S06ds{])@{:*i.@{.@$)@];cz0"1@(bV0 bVzc"_ 1])@:((S00yL{])"2)) (i.@(1001"_){]) pdDS4A    NB. ... purple overwrites red ...

pd 'pdf'


JX02P0500D.png


load 'plot'

pd 'reset'

incz0=:(2-~/\])@:(cz0"1)
incz1=:(2-~/\])@:(cz1"1)
incz2=:(2-~/\])@:(cz2"1)
incz3=:(2-~/\])@:(cz3"1)
veloc=:(((incz0^2:)+incz1^2:)^0.5"_)%incz3

pd (}:@((S06ds{])@{:*i.@{.@$)@];veloc@:((S00yL{])"2)) (i.@(1001"_){]) pdDS4A
pd (}:@((S06ds{])@{:*i.@{.@$)@];veloc@:((S00yL{])"2)) (i.@(1001"_){]) pdDS4B

pd 'pdf'


JX02P0501D.png


load 'plot'

pd 'reset'

pd (((S06ds{])@{:*i.@{.@$)@];cz0"1@:((S00yL{])"2)) pdDS4A    NB. ... blue ...

pd (((S06ds{])@{:*i.@{.@$)@];cz0"1@:((S00yL{])"2)) pdDS4C    NB. ... red ...

pd (((S06ds{])@{:*i.@{.@$)@];cz0"1@:((S00yL{])"2)) pdDS4D    NB. ... green ...

bV0=:0.05 1 2 8 1 1 1 _1 0,:_0.90"_

pd (((S06ds{])@{:*i.@{.@$)@];cz0"1@(bV0 bVzc"_ 1])@:((S00yL{])"2)) pdDS4A    NB. ... purple overwrites red ...

bV0=:0.05 1 2 8 1 1 1 _1 0,:_0.95"_

pd (((S06ds{])@{:*i.@{.@$)@];cz0"1@(bV0 bVzc"_ 1])@:((S00yL{])"2)) pdDS4A    NB. ... pink overwrites green ...

pd 'pdf'


JX02P0502D.png


load 'plot'

pd 'reset'

incz0=:(2-~/\])@:(cz0"1)
incz1=:(2-~/\])@:(cz1"1)
incz2=:(2-~/\])@:(cz2"1)
incz3=:(2-~/\])@:(cz3"1)
veloc=:(((incz0^2:)+incz1^2:)^0.5"_)%incz3

pd (}:@((S06ds{])@{:*i.@{.@$)@];veloc@:((S00yL{])"2)) pdDS4A
pd (}:@((S06ds{])@{:*i.@{.@$)@];veloc@:((S00yL{])"2)) pdDS4C
pd (}:@((S06ds{])@{:*i.@{.@$)@];veloc@:((S00yL{])"2)) pdDS4D

pd 'pdf'


JX02P0503C.png



Next Page: User:Tom Allen/ta/AddendumX02P06
Prev Page: User:Tom Allen/ta/AddendumX02P04