| 1 |
def kouki(suffix $)(expr arij, meg)= |
| 2 |
if arij=1: penpos$.1(hair,0); penpos$.2(hair,90); |
| 3 |
z$.1=z$; z$.2=z$.1+(-.1meg*u-.5hair,.2meg*v-.5hair); |
| 4 |
z$.3=z$.2r-(.1meg*u,.1meg*v); z$.4=z$.2r-(0,.2meg*v); |
| 5 |
z$.5=z$.2r+(.1meg*u,-.1meg*v); penstroke z$.1e{up}...{left}z$.2e; |
| 6 |
filldraw z$.2r...z$.3...z$.4...z$.5...cycle; |
| 7 |
fi |
| 8 |
if arij=2: penpos$.1(hair,0); penpos$.2(hair,-90); |
| 9 |
z$.1=z$; z$.2=z$.1+(.1meg*u+.5hair,.2meg*v-.5hair); |
| 10 |
z$.3=z$.2l+(.1meg*u,-.1meg*v); z$.4=z$.2l-(0,.2meg*v); |
| 11 |
z$.5=z$.2l-(.1meg*u,.1meg*v); penstroke z$.1e{up}...{right}z$.2e; |
| 12 |
filldraw z$.2l...z$.3...z$.4...z$.5...cycle; |
| 13 |
fi |
| 14 |
if arij=3: penpos$.1(hair,-180); penpos$.2(hair,90); |
| 15 |
z$.1=z$; z$.2=z$.1+(-.1meg*u-.5hair,-.2meg*v+.5hair); |
| 16 |
z$.3=z$.2l-(.1meg*u,-.1meg*v); z$.4=z$.2l+(0,.2meg*v); |
| 17 |
z$.5=z$.2l+(.1meg*u,+.1meg*v); penstroke z$.1e{down}...{left}z$.2e; |
| 18 |
filldraw z$.2l...z$.3...z$.4...z$.5...cycle; |
| 19 |
fi |
| 20 |
if arij=4: penpos$.1(hair,-180); penpos$.2(hair,-90); |
| 21 |
z$.1=z$; z$.2=z$.1+(.1meg*u+.5hair,-.2meg*v+.5hair); |
| 22 |
z$.3=z$.2r-(-.1meg*u,-.1meg*v); z$.4=z$.2r+(0,.2meg*v); |
| 23 |
z$.5=z$.2r+(-.1meg*u,+.1meg*v); penstroke z$.1e{down}...{right}z$.2e; |
| 24 |
filldraw z$.2r...z$.3...z$.4...z$.5...cycle; |
| 25 |
fi |
| 26 |
if arij=5: penpos$.1(hair,90); penpos$.2(hair,0); |
| 27 |
z$.1=z$; z$.2=z$.1-(.2meg*u-.5hair,-.1meg*v-.5hair); |
| 28 |
z$.3=z$.2l+(.1meg*u,.1meg*v); z$.4=z$.2l+(.2meg*u,0); |
| 29 |
z$.5=z$.2l+(.1meg*u,-.1meg*v); penstroke z$.1e{left}...{up}z$.2e; |
| 30 |
filldraw z$.2l...z$.3...z$.4...z$.5...cycle; |
| 31 |
fi |
| 32 |
if arij=6: penpos$.1(hair,-90); penpos$.2(hair,0); |
| 33 |
z$.1=z$; z$.2=z$.1-(-.2meg*u+.5hair,-.1meg*v-.5hair); |
| 34 |
z$.3=z$.2r+(-.1meg*u,.1meg*v); z$.4=z$.2r+(-.2meg*u,0); |
| 35 |
z$.5=z$.2r+(-.1meg*u,-.1meg*v); penstroke z$.1e{right}...{up}z$.2e; |
| 36 |
filldraw z$.2r...z$.3...z$.4...z$.5...cycle; |
| 37 |
fi |
| 38 |
if arij=7: penpos$.1(hair,90); penpos$.2(hair,-180); |
| 39 |
z$.1=z$; z$.2=z$.1-(.2meg*u-.5hair,.1meg*v+.5hair); |
| 40 |
z$.3=z$.2r+(.1meg*u,-.1meg*v); z$.4=z$.2r+(.2meg*u,0); |
| 41 |
z$.5=z$.2r+(.1meg*u,.1meg*v); penstroke z$.1e{left}...{down}z$.2e; |
| 42 |
filldraw z$.2r...z$.3...z$.4...z$.5...cycle; |
| 43 |
fi |
| 44 |
if arij=8: penpos$.1(hair,-90); penpos$.2(hair,-180); |
| 45 |
z$.1=z$; z$.2=z$.1+(.2meg*u-.5hair,-.1meg*v-.5hair); |
| 46 |
z$.3=z$.2l-(.1meg*u,.1meg*v); z$.4=z$.2l-(.2meg*u,0); |
| 47 |
z$.5=z$.2l-(.1meg*u,-.1meg*v); penstroke z$.1e{right}...{down}z$.2e; |
| 48 |
filldraw z$.2l...z$.3...z$.4...z$.5...cycle; |
| 49 |
fi |
| 50 |
enddef; |
| 51 |
def mpalla(suffix $)(expr meg)= z$.1=z$; z$.2=z$.1+(0,.1meg*v); |
| 52 |
z$.3=z$.1+(-.1meg*u,0); z$.4=z$.1+(0,-.1meg*v); z$.5=z$.1+(.1meg*u,0); |
| 53 |
filldraw z$.2...z$.3...z$.4...z$.5...cycle |
| 54 |
enddef; |
| 55 |
def kordella(suffix $,$$)= |
| 56 |
(z$.1-z$$)=whatever * (z$$l-z$$r); z$.1-z$=whatever * dir(angle(z$r-z$l)+90); |
| 57 |
(z$.2-z$)=whatever * (z$l-z$r); z$.2-z$$=whatever * dir(angle(z$$r-z$$l)+90); |
| 58 |
z$.3=.5[z$,z$.2]; z$.4=.25[z$,z$$]; |
| 59 |
z$.5-z$$=z$-z$.4; z$.6-z$.2=z$-z$.4; |
| 60 |
z$.7=0.25[z$.1,z$$]; |
| 61 |
filldraw z$r{z$.1-z$}...{z$.2-z$}z$.4...{z$-z$.1}z$.3... |
| 62 |
{z$.2-z$}z$.6...{z$.1-z$}z$$r |
| 63 |
& z$$r--z$$l & z$$l{z$-z$.1}...{z$-z$.2}z$.5...{z$-z$.2}z$.7... |
| 64 |
{z$-z$.1}z$l & z$l--z$r & cycle |
| 65 |
enddef; |
| 66 |
def ka(suffix $)(expr angle)= penpos$(hair,angle) enddef; |
| 67 |
|
| 68 |
def triaina(suffix $,$$,$$$)(expr alpha)= |
| 69 |
numeric theta; |
| 70 |
theta:= angle(z$$$-z$); |
| 71 |
z$.1=(0.5-0.5alpha)[z$,z$$$]; |
| 72 |
z$.1'=(0.5-0.5alpha)[z$$$,z$]; |
| 73 |
z$.2=.5[z$.1,z$.1']+1/8(z$$-z$); |
| 74 |
z$.3=.5[z$.1,z$.1']+5/8(z$$-z$); |
| 75 |
z$.4=.25[z$.1,z$.1']+5/8(z$$-z$); |
| 76 |
z$.4'=.75[z$.1,z$.1']+5/8(z$$-z$); |
| 77 |
z$.5=z$.1+1/6(z$$-z$); |
| 78 |
z$.5'=z$.1'+1/6(z$$-z$); |
| 79 |
z$.7=z$$+.25(z$$$-z$); |
| 80 |
z$.7'=z$$+.75(z$$$-z$); |
| 81 |
z$.8=2/3[z$,z$$]; z$.8'=z$.8+(z$$$-z$); |
| 82 |
penpos$.8(hair,theta); |
| 83 |
penpos$.7(hair,theta-90); |
| 84 |
penpos$.4(hair,theta+180); |
| 85 |
penpos$.5(hair,theta+180); |
| 86 |
penpos$.1(hair,theta-135); |
| 87 |
penpos$.2(3hair,theta-90); |
| 88 |
penpos$.1'(hair,theta-45); |
| 89 |
penpos$.5'(hair,theta); |
| 90 |
penpos$.4'(hair,theta); |
| 91 |
penpos$.7'(hair,theta-90); |
| 92 |
penpos$.8'(hair,theta+180); |
| 93 |
%filldraw z$.1--z$.3 & z$.3--z$.1' & |
| 94 |
%z$.1' -- z$.1 & cycle; |
| 95 |
penstroke z$.8e{z$$-z$}...z$.7e{z$$$-z$} |
| 96 |
...z$.4e{z$-z$$}...z$.5e...z$.1e... |
| 97 |
{z$$$-z$}z$.2e...z$.1'e...z$.5'e... |
| 98 |
z$.4'e{z$$-z$}...z$.7'e{z$$$-z$}... |
| 99 |
z$.8'e{z$-z$$}; |
| 100 |
z$.11=z$.8l; z$.13=z$.11+(alpha/3)*(z$$$-z$); |
| 101 |
z$.11'=z$.8'l; z$.13'=z$.11'-(alpha/3)*(z$$$-z$); |
| 102 |
filldraw z$.11...z$.13...cycle; |
| 103 |
filldraw z$.11'...z$.13'...cycle |
| 104 |
enddef; |
| 105 |
|
| 106 |
def kouti(suffix $,$$)= |
| 107 |
z$$.2=z$r+(z$l-z$$); z$'=z$; |
| 108 |
z$$.1-z$$=whatever*dir(angle(z$r-z$l)+90); |
| 109 |
z$$.1-z$$.2=whatever*(z$l-z$r); |
| 110 |
z$$.3=z$$+(z$$.2-z$$.1); |
| 111 |
filldraw z$$--z$$.1--z$$.2--z$$.3--z$$ & cycle |
| 112 |
enddef; |
| 113 |
|
| 114 |
def louloudi(suffix $) (expr alpha) = |
| 115 |
x$.2=x$.6=x$-0.5alpha*u; x$.8=x$.4=x$+0.5alpha*u; |
| 116 |
x$.1=x$.5=x$-0.05alpha*u; x$.3=x$.7=x$+0.05alpha*u; |
| 117 |
z$.3-z$=whatever*dir45; z$.4=whatever[z$,z$.3]; |
| 118 |
z$.5=whatever[z$,z$.3]; z$.6=whatever[z$,z$.3]; |
| 119 |
z$.1-z$=whatever*dir135; z$.2=whatever[z$,z$.1]; |
| 120 |
z$.7=whatever[z$,z$.1]; z$.8=whatever[z$,z$.1]; |
| 121 |
filldraw z$.3{right}..z$.4{up} & z$.4{left}..z$.3{down} & cycle; |
| 122 |
filldraw z$.1{up}..z$.2{left} & z$.2{down}..z$.1{right} & cycle; |
| 123 |
filldraw z$.6{right}..z$.5{up} & z$.5{left}..z$.6{down} & cycle; |
| 124 |
filldraw z$.8{up}..z$.7{left} & z$.7{down}..z$.8{right} & cycle; |
| 125 |
enddef; |
| 126 |
|
| 127 |
def laimoc_swab = |
| 128 |
penpos1.1(stem,0); penpos1.3(stem,0); |
| 129 |
penpos1.4(hair,90); penpos1.5(hair,-90); |
| 130 |
y1.1=y1.1'=foot; x1.1l=x1.2=0.413stem; |
| 131 |
x1.1'=x1.4=0; x1.3=x1.1; x1.5=x1.1r+0.761stem; |
| 132 |
y1.5l=cap_height+apex_o; |
| 133 |
z1.5l-z1.4r=whatever*dir17; |
| 134 |
y1.3=0.828cap_height; y1.2=0.273cap_height; |
| 135 |
filldraw z1.1'...z1.2---z1.3l... |
| 136 |
z1.4l & z1.4l--z1.4r--z1.5l--z1.5r |
| 137 |
& z1.5r{left}...z1.3r---z1.1r & |
| 138 |
z1.1r--z1.1' & cycle enddef; |
| 139 |
|
| 140 |
def podi_swab (expr theta) = |
| 141 |
penpos2.1(1.304stem,theta); |
| 142 |
penpos2.2(1.304stem,theta); |
| 143 |
z2.1l=(0,foot); |
| 144 |
z2.1l-z2.2l=whatever*dir151; |
| 145 |
y2.2l=-apex_o; penpos2.3(hair,theta-90); |
| 146 |
z2.3r=z2.2; |
| 147 |
z2.05=(2/3apex_o,2/3apex_o); |
| 148 |
penpos2.1'(1.304stem,theta); |
| 149 |
z2.1'=0.5[z2.1,z2.2]+z2.05; |
| 150 |
penstroke z2.2e..z2.1'e..z2.1e |
| 151 |
enddef; |
| 152 |
|
| 153 |
def long_s = numeric w',h',d'; |
| 154 |
w':=6.038u; h':=1.414x_height; |
| 155 |
d':=3.208u; |
| 156 |
penpos1.1(2/3hair,0); |
| 157 |
z1.1=(0.313w',-d'); |
| 158 |
penpos1.2(1.283stem,0); |
| 159 |
z1.2=(0.344w',0.589h'); |
| 160 |
penpos1.4(hair,90); |
| 161 |
z1.4l=(0,y1.2-1/3stem); |
| 162 |
z1.3=(z1.1l..{dir92.5}z1.2l) |
| 163 |
intersectionpoint |
| 164 |
((0,y1.4l)--(w',y1.4l)); |
| 165 |
z1.5=(0.35w',0.761h'); |
| 166 |
penpos1.6(0.957stem,-118); |
| 167 |
z1.6l=(0.669w',h'); |
| 168 |
penpos1.7(1.174stem,-125); |
| 169 |
z1.7l=(w',0.962h'); penpos1.8(hair,-35); |
| 170 |
z1.8r=z1.7l; z1.9-z1.8l=whatever*(z1.7l-z1.7r); |
| 171 |
x1.9=0.9w'; |
| 172 |
penpos1.11(2/3stem,-90); y1.11=y1.2; |
| 173 |
x1.11=0.763w'; |
| 174 |
penpos1.12(2/3stem,-90); z1.12=z1.2; |
| 175 |
filldraw z1.1r..z1.2r{dir87} & |
| 176 |
z1.2r{dir126}..z1.5{up}..z1.6r{right} |
| 177 |
..z1.7r{right}--z1.8r--z1.8l--z1.9 |
| 178 |
& z1.9{left}..z1.6l{left}.. |
| 179 |
z1.4r{dir218}--z1.4l{right}-- |
| 180 |
z1.3{dir272.5}..z1.1l--z1.1r & cycle; |
| 181 |
if isitf: filldraw z1.11r--z1.12r-- |
| 182 |
z1.12l--z1.5{down}...(x1.2r,y1.11l){right} |
| 183 |
---z1.11l--z1.11r & cycle; fi |
| 184 |
enddef; |
| 185 |
|
| 186 |
def dexi_podi_swab (expr yy) = |
| 187 |
penpos1.2(stem,0); |
| 188 |
z1.2r=(1.63stem,0.694x_height); |
| 189 |
penpos1.1(whatever,24); |
| 190 |
penpos1.3(whatever,43); |
| 191 |
x1.1l=x1.2l; z1.3l=z1.2l; |
| 192 |
x1.1r=x1.2r=x1.3r; y1.1l=yy; |
| 193 |
penpos1.4(1.348stem,43); |
| 194 |
x1.4l=0; y1.4r=x_height+apex_o; |
| 195 |
penstroke z1.1e---z1.3e... |
| 196 |
z1.4e{dir133} enddef; |
| 197 |
|
| 198 |
def aristero_podi_swab (expr xx) = |
| 199 |
w':=5.057u; penpos2.1(stem,0); |
| 200 |
z2.1l=(xx+1.261stem,0.694x_height); |
| 201 |
penpos2.2(whatever,34); |
| 202 |
z2.2l=(x2.1l,-apex_o); x2.2r=xx+w'; |
| 203 |
penpos2.3(hair,-90); z2.3r=z2.2r; |
| 204 |
z2.4=(x2.1r,0.378x_height); |
| 205 |
z2.6=(xx+0.545w',x_height+apex_o); |
| 206 |
penpos2.5(hair,-90); |
| 207 |
z2.5l-z2.6=whatever*dir-40; |
| 208 |
x2.5=xx+0.9w'; |
| 209 |
penpos2.7(hair,-90); |
| 210 |
z2.6-z2.7l=whatever*dir33; |
| 211 |
x2.7=xx; z2.8-z2.7r=whatever*(z2.6-z2.7l); |
| 212 |
z2.8=whatever[z2.6,z2.5r]; |
| 213 |
penpos2.9(1.217stem,33); |
| 214 |
z2.9r=z2.8; |
| 215 |
z2.9l-z2.11=whatever*(z2.6-z2.5l); |
| 216 |
x2.11=x2.1l; |
| 217 |
filldraw z2.7r--z2.9l--z2.11-- |
| 218 |
z2.2l--z2.3r--z2.3l{z2.2l-z2.2r}..{up} |
| 219 |
z2.4---z2.1r...z2.5r{right}-- |
| 220 |
z2.5l--z2.6--z2.7l--z2.7r & |
| 221 |
cycle enddef; |
| 222 |
|
| 223 |
def e_umlaut(suffix $) = |
| 224 |
penpos$.1(2u,45); z$.1=z$; |
| 225 |
pickup pensquare yscaled 0.5hair xscaled 0.3[hair,stem] rotated 30; |
| 226 |
z$.2=z$.1r; z$.3=z$.1l; rt x$.4=rt x$.2; top y$.4=y$; |
| 227 |
draw z$.3--z$.2..z$.3..z$.4; |
| 228 |
enddef; |
| 229 |
|