summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/Ccurve.m4
blob: 4aed3fb1ab2256dbe8d9729cb9386d9e8417a284 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
.PS
# Ccurve.m4
gen_init
# Gosper C curve

`define' c_curve {if $3==0 then { continue by ($1,$2) } else {
    c_curve( ($1-$2)/2, ($1+$2)/2, $3-1)
    c_curve( ($1+$2)/2, ($2-$1)/2, $3-1)}}

line from 0,4 to 0,4
c_curve(0,4,10)

.PE