Skip to content

Instantly share code, notes, and snippets.

@thehappycheese
Created December 26, 2023 19:02
Show Gist options
  • Save thehappycheese/ce055451a8cb63e9a9860184b0d8d70c to your computer and use it in GitHub Desktop.
Save thehappycheese/ce055451a8cb63e9a9860184b0d8d70c to your computer and use it in GitHub Desktop.
Mendelbressenuiuabrott
# pairwise coefficient of interpolation
Interp ← ÷:⊃(-≡⊢|≡/-)◫2
MarchingSquares ← (
:
⊃(
≡(◫2)Interp
| ◫2⍜⍉Interp
| ≡≡(°⋯♭)◫2_2> # types
| ≡°⍉⍉⊞⊟∩(⇡-1)⊃(⊢⇌|⊢)△
)
⊙≡⍉
# ⊃(△|⋅△|⋅⋅△|⋅⋅⋅△|⊙⊙⊙∘)
# &p $"h_ v_ t_ c_"
≡≡(
:⊂∩⍉⇌:∩(⊟0_1)
(
# Selections are suspect
[] # 0
| [▽1_0_1_0] # 1
| [▽1_0_0_1] # 2
| [▽0_0_1_1] # 3
| [▽0_1_1_0] # 4
| [▽1_1_0_0] # 5
| [⊃(▽1_0_0_1|▽0_1_1_0)] # 6
| [▽0_1_0_1] # 7
| [▽0_1_0_1] # 8
| [⊃(▽1_0_1_0|▽0_1_0_1)] # 9
| [▽1_1_0_0] # 10
| [▽0_1_1_0] # 11
| [▽0_0_1_1] # 12
| [▽1_0_0_1] # 13
| [▽1_0_1_0] # 14
| [] # 15
)
(□+¤¤:|□[])=0⧻.
)
°¤
⊐/⊂
)
📈 ← ⊟⁅×,⊃(÷|⇡+1)
Line ← (
≡⇌(¤;|⍉+×(⇌📈:|📈)<,,⊃(⊢⇌)⊢×,:±.)¬≍0_0.⊃/-(⊢)⁅
)
Lines ← ⊐/⊂≡(□Line)
PolyLine ← Lines ◫2
PolyLines ← ⊐/⊂≡(□PolyLine °□)
ImageSquare ← ↯:0⊟.
Raster ← ∧⍜⊡⋅1▽≡/↧↧⊃(<:|≥0|∘)⊙(¤△.)
ComplexGrid ← ℂ⍉.÷:-,×2⊙(-1)◿,↯↯2,⇡×..
Mandel ← ;:⌵⍥(+×∩.)11 .-0.7×1.2ComplexGrid
¤ Mandel 200
MsT ← ×600÷¤¤⇌-1△:MarchingSquares ⊙.
+0.01×4÷10⇡10
≡(□MsT)
⊐/⊂
Raster Lines : ImageSquare 600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment