| 1 |
% some2Dvecs.mp |
| 2 |
% L. Nobre G. |
| 3 |
% 2002 |
| 4 |
|
| 5 |
verbatimtex |
| 6 |
\documentclass{article} |
| 7 |
\begin{document} |
| 8 |
etex |
| 9 |
|
| 10 |
beginfig(1); |
| 11 |
numeric hsize, qsize, nsize, ldist; |
| 12 |
numeric alray, beray, alang, beang; |
| 13 |
numeric stampnum, initang, i, stepang, stampoffset; |
| 14 |
pair hvec, qvec, nvec; |
| 15 |
path Hvec, Qvec, Nvec, alarc, bearc, vertic; |
| 16 |
picture labelstr, labelpic; |
| 17 |
color mycolor; |
| 18 |
picture stamp; |
| 19 |
bboxmargin := 4mm; |
| 20 |
stampnum = 36; |
| 21 |
stampoffset = 0.42mm; |
| 22 |
alang = 6; |
| 23 |
beang = 17; |
| 24 |
hsize = 6mm; |
| 25 |
qsize = 3*hsize; |
| 26 |
nsize = 4*hsize; |
| 27 |
ldist = 3.17*hsize; |
| 28 |
alray = 2*0.735*nsize; |
| 29 |
beray = 2*0.6*qsize; |
| 30 |
mycolor = (0.8,0.7,1); |
| 31 |
% drawoptions( withcolor mycolor ); |
| 32 |
hvec = hsize*left; |
| 33 |
qvec = qsize*(-sind(beang),cosd(beang)); |
| 34 |
nvec = nsize*(-sind(alang),cosd(alang)); |
| 35 |
Hvec = origin--hvec; |
| 36 |
Qvec = origin--qvec; |
| 37 |
Nvec = origin--nvec; |
| 38 |
vertic = origin--ldist*up; |
| 39 |
alarc = fullcircle scaled alray |
| 40 |
cutbefore vertic cutafter Nvec; |
| 41 |
bearc = fullcircle scaled beray |
| 42 |
cutbefore vertic cutafter Qvec; |
| 43 |
drawarrow Hvec; |
| 44 |
drawarrow Qvec; |
| 45 |
drawarrow Nvec; |
| 46 |
draw alarc; |
| 47 |
draw bearc; |
| 48 |
draw vertic dashed evenly; |
| 49 |
draw unitsquare scaled (0.2*hsize); |
| 50 |
labelstr = btex |
| 51 |
$2,\!4\times 1,\!8\,\mbox{mm}^2$ |
| 52 |
etex; |
| 53 |
label.rt( labelstr, ldist*right ); |
| 54 |
% label.lft( btex $\vec{n}_0$ etex, nvec ); |
| 55 |
label.lft( btex $x$ etex, nvec ); |
| 56 |
label.lft( btex $\vec{q}$ etex, qvec ); |
| 57 |
label.top( btex $\vec{B}$ etex, hvec ); |
| 58 |
label.urt( btex $-0.48^\circ$ etex, point 1 of alarc ); |
| 59 |
label.lft( btex $6^\circ$ etex, point 1 of bearc ); |
| 60 |
stamp = currentpicture; |
| 61 |
fill bbox stamp withcolor (0.85,0.85,0); |
| 62 |
initang = 180/stampnum; |
| 63 |
stepang = 2*initang; |
| 64 |
drawoptions(); |
| 65 |
for i=0 upto (stampnum-1): |
| 66 |
draw stamp |
| 67 |
shifted (stampoffset*dir(initang+i*stepang)) |
| 68 |
withcolor white; |
| 69 |
endfor; |
| 70 |
draw stamp; |
| 71 |
endfig; |
| 72 |
|
| 73 |
verbatimtex |
| 74 |
\end{document} |
| 75 |
etex |
| 76 |
|
| 77 |
end. |