Change starting conditions slightly
This commit is contained in:
parent
7236ed5566
commit
cc9a8f259e
2 changed files with 8 additions and 7 deletions
|
@ -8,4 +8,4 @@ rm out/step00000.pnm
|
||||||
# convert all to PNG
|
# convert all to PNG
|
||||||
parallel --jobs 8 "pnmtopng {} > {.}.png" ::: out/*.pnm
|
parallel --jobs 8 "pnmtopng {} > {.}.png" ::: out/*.pnm
|
||||||
# generate video
|
# generate video
|
||||||
ffmpeg -y -framerate 30 -pattern_type glob -i 'out/*.png' -r 30 -vf scale=500:-1 -loop 0 out.mp4
|
ffmpeg -y -framerate 30 -pattern_type glob -i 'out/*.png' -r 30 -vf scale=500:-1 out.mp4
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# Parameters
|
# Parameters
|
||||||
dt‿da‿db‿f‿k←⟨1.0,0.16,0.08,0.060,0.062⟩
|
dt‿da‿db‿f‿k←⟨1.0,0.16,0.08,0.060,0.062⟩
|
||||||
n←500 # image size
|
n←500 # image size
|
||||||
m←10 # seed size at the center of the image
|
m←150 # seed size at the center of the image
|
||||||
|
|
||||||
# Discrete Laplacian
|
# Discrete Laplacian
|
||||||
Lapl←(+´∘∾1‿¯1(⌽⋈⌽˘)¨<)-4⊸×
|
Lapl←(+´∘∾1‿¯1(⌽⋈⌽˘)¨<)-4⊸×
|
||||||
|
@ -15,15 +15,16 @@ Update←(UpdateA⋈UpdateB)´
|
||||||
|
|
||||||
# Initialization
|
# Initialization
|
||||||
a←n‿n⥊1
|
a←n‿n⥊1
|
||||||
Mask←{𝕩‿𝕩↑(-𝕨‿𝕨+𝕩÷2)↑(2×𝕨‿𝕨)⥊1}
|
SquareMask←{𝕩‿𝕩↑(-𝕨‿𝕨+𝕩÷2)↑(2×𝕨‿𝕨)⥊1}
|
||||||
b←(m Mask n)⌈0.1×n‿n•rand.Range 0
|
CircleMask←{(𝕨×𝕨)≥(⌽∘⍉∾⍉)(⌽∾⊢)+○(⋆⟜2)⌜˜↕𝕩÷2}
|
||||||
|
mask←(n‿n•rand.Range 2)×m CircleMask n
|
||||||
|
b←mask⌈0.05×n‿n•rand.Range 0
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
Step←{stepsize 𝕊 i‿a‿b:
|
Step←{stepsize 𝕊 i‿a‿b:
|
||||||
•term.OutRaw"."
|
•Show i×stepsize
|
||||||
•term.Flush @
|
|
||||||
ap‿bp←Update⍟stepsize a‿b
|
ap‿bp←Update⍟stepsize a‿b
|
||||||
("out/step"∾(¯5↑∾•Fmt¨5-⊸↑i)∾".pnm")•file.Chars (PPM ⌊255×>Inferno¨1-a)∾@+10
|
("out/step"∾(¯5↑∾•Fmt¨5-⊸↑i)∾".pnm")•file.Chars (PPM ⌊255×>Viridis¨1-a)∾@+10
|
||||||
(i+1)‿ap‿bp
|
(i+1)‿ap‿bp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue