Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Brownian-tree/J/brownian-tree-1.j
Normal file
19
Task/Brownian-tree/J/brownian-tree-1.j
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
brtr=:4 :0
|
||||
seed=. ?x
|
||||
clip=. 0 >. (<:x) <."1 ]
|
||||
near=. [: clip +"1/&(,"0/~i:1)
|
||||
p=.i.0 2
|
||||
mask=. 1 (<"1 near seed)} x$0
|
||||
field=.1 (<seed)} x$0
|
||||
for.i.y do.
|
||||
p=. clip (p +"1 <:?3$~$p),?x
|
||||
b=.(<"1 p) { mask
|
||||
fix=. b#p
|
||||
if.#fix do. NB. if. works around j602 bug: 0(0#a:)}i.0 0
|
||||
p=. (-.b)# p
|
||||
mask=. 1 (<"1 near fix)} mask
|
||||
field=. 1 (<"1 fix)} field
|
||||
end.
|
||||
end.
|
||||
field
|
||||
)
|
||||
2
Task/Brownian-tree/J/brownian-tree-2.j
Normal file
2
Task/Brownian-tree/J/brownian-tree-2.j
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
require'viewmat'
|
||||
viewmat 480 640 brtr 30000
|
||||
Loading…
Add table
Add a link
Reference in a new issue