Cistercian numerals: Difference between revisions

Line 1,789:
d_paths=: (, ((2-[),])/"1 L:0 , (,3&-)/"1 L:0 , ((2-[),(3-]))/"1 L:0) d_paths
d_paths=: , a: ,. _9]\ d_paths NB. adjust indexing
NB.echo d_paths NB. test
 
NB.def transform(x, y, dx, dy, sc):
NB. """Transform the coordinates (x, y) into the scaled, displaced system."""
Line 1,807 ⟶ 1,808:
'i d'=. y
if. d do.
path=. d_paths {::~ d + 10 *#. iy
result=. 'M{},{} 'format~ TPRMS transform {. path
result=. result , }: , ' ' ,.~ 'L{},{}'format"1~TPRMS transform"1 }. path
Line 1,904 ⟶ 1,905:
fo=. open<y
svg_preamble fo
for_i. }. i. 10000 do.
TPRMS=: (5 ,~ (5 + 15 * 125 | ]) , 5 + 25 * [: (<.) 125 *^:_1 ]) i
fo make_numeral i
Line 1,913 ⟶ 1,914:
)
rc=: 3 :0 ::('Use: rc ''filename.svg'''"_)
scale=. 205
TPRMS=: 5 5 , scale
rm<y
fo=. open<y
svg_preamble fo
NB. for_i. }. i. 10000 do.
RC=. 0 1 20 300 666 4000 5555 6789
echo 'writing {}' format~ < RC
Anonymous user