aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-06-22 22:25:09 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-06-22 22:26:59 -0400
commitfc9eac147ab8bf49f2389c6b90500a35f2aa2e62 (patch)
treebb793d08bf0343cdaae1c9a996022ab4e5e36e18
parentab42bf26eaa7cc9bb3a34aefdd09a42c33312114 (diff)
Better fold diagram alignment
-rw-r--r--doc/fold.md9
-rw-r--r--docs/doc/fold.html34
2 files changed, 22 insertions, 21 deletions
diff --git a/doc/fold.md b/doc/fold.md
index 6300e715..8e8d17a0 100644
--- a/doc/fold.md
+++ b/doc/fold.md
@@ -25,16 +25,17 @@ Brak ← {
}
_pair ← {1(↓𝔽-⊸↓)⊢}
-tx ← ↕≠xt ⋄ ty ← 0.8+5×↕2
-sy ← (2÷˜+´ty)-3×0.5-˜(↕÷-⟜1) ≠sx←2÷˜+_pair tx
-tp ← tx≍¨⊑ty ⋄ sp ← sx≍¨sy
+tx ← ↕≠xt ⋄ ty ← 0.8+5×↕2 ⋄ tp ← tx≍¨⊑ty ⋄ tw ← ¯0.23
+sy ← (2÷˜+´ty)-3×0.5-˜(↕÷-⟜1) ≠sx←0.14-˜2÷˜+_pair tx
+sx +↩ (÷´(sx+⟜tw⊸≍○(⊢´)sy)-¯2⊑tp)×-⟜(⊢´)sy
+sp ← sx≍¨sy
dim ← ⟨2.5+≠tx,0.8+1⊑ty⟩ ⋄ sh ← ¯2.3‿0
lp ← 0.35
((∾˜d)×((-∾+˜)1‿0.3)+sh∾dim) SVG g Ge ⟨
"rect" Elt rc ∾ (Pos d×sh)∾"width"‿"height"≍˘FmtNum d×dim
lg Ge Line¨ ∾⟨
- tp (≍+·≍⟜-·(⊢×lp÷1⊸⊑)-)¨ ¯0.25‿0<⊸(+ ∾ ⊣-˜¯1⊏⊢)sp
+ tp (≍+·≍⟜-·(⊢×lp÷1⊸⊑)-)¨ tw‿0<⊸(+ ∾ ⊣-˜¯1⊏⊢)sp
((lpׯ0.5‿1≍1.2‿¯0.5)+≍)¨_pair sp
⟨sx {⍉(≍˜𝕨)≍(≍⟜-lp)+𝕩≍1⊑ty}○⊑ sy⟩
diff --git a/docs/doc/fold.html b/docs/doc/fold.html
index 5ae46961..7c03d174 100644
--- a/docs/doc/fold.html
+++ b/docs/doc/fold.html
@@ -9,17 +9,17 @@
<g font-size='21px' fill='currentColor' stroke-linecap='round' text-anchor='middle' font-family='BQN,monospace'>
<rect class='code' stroke-width='1.5' rx='12' x='-128.8' y='0' width='476' height='264'/>
<g class='lilac' stroke-width='2'>
- <line x1='1.225' y1='46' x2='12.775' y2='178'/>
- <line x1='57.508' y1='46' x2='68.492' y2='148'/>
- <line x1='113.96' y1='46' x2='124.04' y2='118'/>
- <line x1='170.8' y1='46' x2='179.2' y2='88'/>
- <line x1='228.9' y1='46' x2='233.1' y2='58'/>
- <line x1='275.1' y1='46' x2='270.9' y2='58'/>
- <line x1='74.2' y1='176' x2='51.52' y2='185'/>
- <line x1='130.2' y1='146' x2='107.52' y2='155'/>
- <line x1='186.2' y1='116' x2='163.52' y2='125'/>
- <line x1='242.2' y1='86' x2='219.52' y2='95'/>
- <line x1='28' y1='206' x2='28' y2='218'/>
+ <line x1='2.548' y1='46' x2='26.572' y2='178'/>
+ <line x1='58.548' y1='46' x2='77.112' y2='148'/>
+ <line x1='114.548' y1='46' x2='127.652' y2='118'/>
+ <line x1='170.548' y1='46' x2='178.192' y2='88'/>
+ <line x1='226.548' y1='46' x2='228.732' y2='58'/>
+ <line x1='271.964' y1='46' x2='265.076' y2='58'/>
+ <line x1='82.74' y1='176' x2='65.52' y2='185'/>
+ <line x1='133.28' y1='146' x2='116.06' y2='155'/>
+ <line x1='183.82' y1='116' x2='166.6' y2='125'/>
+ <line x1='234.36' y1='86' x2='217.14' y2='95'/>
+ <line x1='42' y1='206' x2='42' y2='218'/>
</g>
<g text-anchor='end'>
<text dy='0.32em' x='-61.6' y='32'>𝕩</text>
@@ -31,12 +31,12 @@
<text dy='0.32em' x='168' y='32'><tspan class='Number'>3</tspan></text>
<text dy='0.32em' x='224' y='32'><tspan class='Number'>4</tspan></text>
<text dy='0.32em' x='280' y='32'><tspan class='Number'>2</tspan></text>
- <text dy='0.32em' x='28' y='232'><tspan class='Number'>6</tspan></text>
- <text dy='0.32em' x='28' y='192'><tspan class='Number'>2</tspan><tspan class='Function'>-</tspan><tspan class='Number'>¯4</tspan></text>
- <text dy='0.32em' x='84' y='162'><tspan class='Number'>0</tspan><tspan class='Function'>-</tspan><tspan class='Number'>4</tspan></text>
- <text dy='0.32em' x='140' y='132'><tspan class='Number'>5</tspan><tspan class='Function'>-</tspan><tspan class='Number'>1</tspan></text>
- <text dy='0.32em' x='196' y='102'><tspan class='Number'>3</tspan><tspan class='Function'>-</tspan><tspan class='Number'>2</tspan></text>
- <text dy='0.32em' x='252' y='72'><tspan class='Number'>4</tspan><tspan class='Function'>-</tspan><tspan class='Number'>2</tspan></text>
+ <text dy='0.32em' x='42' y='232'><tspan class='Number'>6</tspan></text>
+ <text dy='0.32em' x='42' y='192'><tspan class='Number'>2</tspan><tspan class='Function'>-</tspan><tspan class='Number'>¯4</tspan></text>
+ <text dy='0.32em' x='92.54' y='162'><tspan class='Number'>0</tspan><tspan class='Function'>-</tspan><tspan class='Number'>4</tspan></text>
+ <text dy='0.32em' x='143.08' y='132'><tspan class='Number'>5</tspan><tspan class='Function'>-</tspan><tspan class='Number'>1</tspan></text>
+ <text dy='0.32em' x='193.62' y='102'><tspan class='Number'>3</tspan><tspan class='Function'>-</tspan><tspan class='Number'>2</tspan></text>
+ <text dy='0.32em' x='244.16' y='72'><tspan class='Number'>4</tspan><tspan class='Function'>-</tspan><tspan class='Number'>2</tspan></text>
<g class='bluegreen' stroke-width='3' style='fill:none' opacity='0.7'><path d='M-22.4 17l-6 15l6 15M302.4 17l6 15l-6 15'/></g>
</g>
</svg>