| 1 |
% equilatrianglelines.mp |
| 2 |
% L. Nobre G. |
| 3 |
% 2009 |
| 4 |
|
| 5 |
prologues := 1; |
| 6 |
|
| 7 |
beginfig(1); |
| 8 |
numeric u, factordown, ang, angl, angh, ydown, xl, xh, astep; |
| 9 |
pen pendot; |
| 10 |
path uline, rline, dline; |
| 11 |
pair auxp; |
| 12 |
u = 2cm; |
| 13 |
factordown = 2.34; |
| 14 |
astep = 2.75; |
| 15 |
xl = -2u; |
| 16 |
xh = 10u; |
| 17 |
angl = 7; |
| 18 |
angh = 38; |
| 19 |
pendot = pencircle scaled (2.5mm); |
| 20 |
ydown = -u*factordown; |
| 21 |
uline = (xl,u)--(xh,u); |
| 22 |
rline = uline rotated (-60); |
| 23 |
dline = (xl,ydown)--(xh,ydown); |
| 24 |
draw uline; |
| 25 |
draw (xl,0)--(xh,0); |
| 26 |
draw dline; |
| 27 |
draw rline; |
| 28 |
z1 = rline intersectionpoint dline; |
| 29 |
draw z1 withpen pendot; |
| 30 |
draw origin withpen pendot; |
| 31 |
for ang=angl step astep until angh: |
| 32 |
pair uapex; |
| 33 |
ypart uapex = u; |
| 34 |
uapex = whatever*dir(ang); |
| 35 |
auxp := uapex+abs(uapex)*dir(ang-120); |
| 36 |
draw origin--uapex--auxp--cycle; |
| 37 |
endfor; |
| 38 |
endfig; |
| 39 |
|
| 40 |
end. |