| 1 |
% simplecarparam.mp |
| 2 |
% L. Nobre G. |
| 3 |
% 2011 |
| 4 |
|
| 5 |
input featpost3Dplus2D; |
| 6 |
|
| 7 |
verbatimtex |
| 8 |
\documentclass{article} |
| 9 |
\begin{document} |
| 10 |
etex |
| 11 |
|
| 12 |
%f := 0.25*(2,2.15,15.3); |
| 13 |
f := (3.5,8,1.1); |
| 14 |
Spread := 220; |
| 15 |
|
| 16 |
beginfig(1); |
| 17 |
color lencol, froncol, rearcol; |
| 18 |
color a, b, c, d, ca, cb, cc, cd; |
| 19 |
numeric lx, ly, lz, fx, fy, fz, hei; |
| 20 |
lx = 0.8; |
| 21 |
ly = 0.35; |
| 22 |
lz = 0.18; |
| 23 |
fx = 0.1; |
| 24 |
fy = 0.2; |
| 25 |
fz = 0.132; |
| 26 |
hei = 0.035; |
| 27 |
lencol = (lx, ly, lz); |
| 28 |
show lencol; |
| 29 |
froncol = (fx, fy, fz); |
| 30 |
show froncol; |
| 31 |
rearcol = (0.6*fx, 0.3*fy, 0.76*fz ); |
| 32 |
show rearcol; |
| 33 |
a = (0.5*lx,0.5*ly,-0.5*lz); |
| 34 |
b = (0.5*lx-fx,0.5*ly,-0.5*lz); |
| 35 |
c = (0.5*lx-fx,0.5*ly+fy,-0.5*lz); |
| 36 |
d = (0.5*lx-fx-fz,0.5*ly+fy,-0.5*lz); |
| 37 |
ca= 0.5*(lx,ly,-lz); |
| 38 |
cb= 0.5*(lx,-ly,-lz); |
| 39 |
cc= 0.5*(-lx,ly,-lz); |
| 40 |
cd= 0.5*(-lx,-ly,-lz); |
| 41 |
drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); |
| 42 |
simplecar( black, black, lencol, froncol, rearcol ); |
| 43 |
drawoptions( withpen pencircle scaled 1.3pt ); |
| 44 |
draw rp(cd)--rp(cb) dashed evenly; |
| 45 |
draw rp(cd)--rp(cc) dashed evenly; |
| 46 |
draw rp(cd)--rp(-ca) dashed evenly; |
| 47 |
draw rp(ca)--rp(-ca) dashed evenly; |
| 48 |
draw rp(cb)--rp(-cb) dashed evenly; |
| 49 |
draw rp(cc)--rp(-cc) dashed evenly; |
| 50 |
draw rp(cd)--rp(-cd) dashed evenly; |
| 51 |
drawdblarrow rp(a)--rp(b); |
| 52 |
drawdblarrow rp(b)--rp(c); |
| 53 |
drawdblarrow rp(c)--rp(d); |
| 54 |
label.top( btex $\vec{o}$ etex, rp(black)); |
| 55 |
drawoptions( withcolor 0.87red ); |
| 56 |
labelinspace( true, 0.3[a,b], -red, hei*blue, btex Xf etex ); |
| 57 |
labelinspace( true, 0.3[b,c], green, hei*blue, btex Yf etex ); |
| 58 |
labelinspace( true, 0.3[c,d], -red, hei*blue, btex Zf etex ); |
| 59 |
endfig; |
| 60 |
|
| 61 |
verbatimtex |
| 62 |
\end{document} |
| 63 |
etex |
| 64 |
|
| 65 |
end; |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|