| 1 |
% integratorfigures.mp |
| 2 |
% L. Nobre G. |
| 3 |
% 2007 |
| 4 |
|
| 5 |
input featpost3Dplus2D; |
| 6 |
|
| 7 |
verbatimtex |
| 8 |
\documentclass{article} |
| 9 |
\begin{document} |
| 10 |
etex |
| 11 |
|
| 12 |
beginfig(1); |
| 13 |
f := (5,3,2); |
| 14 |
Spread := 90; |
| 15 |
numeric axlen, disclen, discpos, dradius, dxo, dy; |
| 16 |
color dcenter, xlim, dxr, dxco, dxro, vdy, dxa, dxb; |
| 17 |
path xtip, neadx, fardx, dx; |
| 18 |
axlen = 1.65; |
| 19 |
disclen = 0.15; |
| 20 |
discpos = 0.85; |
| 21 |
dy = 0.02; |
| 22 |
vdy = -dy*green; |
| 23 |
dradius = 1 +-+ discpos; |
| 24 |
dxo = dradius + 0.5; |
| 25 |
cartaxes( axlen, axlen, axlen ); |
| 26 |
dcenter = discpos*red; |
| 27 |
xlim = axlen*red; |
| 28 |
xtip = rp(dcenter)--rp(xlim); |
| 29 |
drawoptions( withpen pencircle scaled 1.2pt ); |
| 30 |
rigorousdisc( 0, true, discpos*red, dradius, -disclen*red ); |
| 31 |
drawoptions(); |
| 32 |
% draw goodcirclepath( black, blue, 1 ) dashed evenly; |
| 33 |
% draw goodcirclepath( black, red, 1 ) dashed evenly; |
| 34 |
% draw goodcirclepath( black, green, 1 ) dashed evenly; |
| 35 |
% drawoptions( withpen pencircle scaled 1.2pt ); |
| 36 |
draw spatialhalfcircle( black, blue, 1, true ); |
| 37 |
draw spatialhalfcircle( black, red, 1, true ); |
| 38 |
draw spatialhalfcircle( black, green, 1, true ); |
| 39 |
drawoptions(); |
| 40 |
drawarrow xtip; |
| 41 |
% draw rp(black)--rp(dcenter) dashed evenly; |
| 42 |
draw rigorousfearpath( black, 1 ); |
| 43 |
dxco = (discpos,dxo,0); |
| 44 |
dxr = (discpos-disclen,dradius,0); |
| 45 |
dxro = (discpos-disclen,dxo,0); |
| 46 |
neadx = rp(dcenter)--rp(dxco); |
| 47 |
fardx = rp(dxr)--rp(dxro); |
| 48 |
dxa = dxco+vdy; |
| 49 |
dxb = dxro+vdy; |
| 50 |
draw fardx; |
| 51 |
draw neadx; |
| 52 |
dx = rp(dxa)--rp(dxb); |
| 53 |
drawdblarrow dx; |
| 54 |
% label.rt( btex $dx$ etex, rp(0.5[dxa,dxb]) ); |
| 55 |
label.rt( "dx", rp(0.5[dxa,dxb]) ); |
| 56 |
label.bot( "x" ,rp(xlim)); |
| 57 |
endfig; |
| 58 |
|
| 59 |
input boxes; |
| 60 |
|
| 61 |
beginfig(2); |
| 62 |
f := (3,2.05,2.35); |
| 63 |
Spread := 140; |
| 64 |
numeric labscal, bray, sray, angb, phi, phib; |
| 65 |
picture labrb, labrs, plb, pls; |
| 66 |
color cenb, momb, lpos, hpos; |
| 67 |
path vaa, vb, ha, hb, hapart; |
| 68 |
labscal = 2; |
| 69 |
ahlength := 8pt; |
| 70 |
ahangle := 30; |
| 71 |
bray = 0.95; |
| 72 |
sray = 0.4; |
| 73 |
angb = 9; |
| 74 |
phi = 55; |
| 75 |
phib = 83; |
| 76 |
labrb= btex $(b+r\cos\phi)d\theta$ etex scaled labscal; |
| 77 |
labrs= btex $r\,d\phi$ etex scaled labscal; |
| 78 |
drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); |
| 79 |
smoothtorus( black, blue, bray, sray ); |
| 80 |
% drawoptions( withpen pencircle scaled 1.3pt dashed evenly ); |
| 81 |
drawoptions( ); |
| 82 |
vaa = goodcirclepath( bray*red, green, sray ); |
| 83 |
draw vaa withcolor red; |
| 84 |
cenb = bray*(red*cosd(angb)+green*sind(angb)); |
| 85 |
momb = green*cosd(angb)-red*sind(angb); |
| 86 |
lpos = cenb*(1+sray*cosd(phi)/bray)+blue*sray*sind(phi); |
| 87 |
hpos = cenb*(1+sray*cosd(phib)/bray)+blue*sray*sind(phib); |
| 88 |
vb = goodcirclepath( cenb, momb, sray ); |
| 89 |
draw vb withcolor (blue+green); |
| 90 |
ha = goodcirclepath( blue*sray*sind(phi), blue, bray+sray*cosd(phi) ); |
| 91 |
draw ha; |
| 92 |
hb = goodcirclepath( blue*sray*sind(phib), blue, bray+sray*cosd(phib) ); |
| 93 |
draw hb withcolor green; |
| 94 |
% show length ha; |
| 95 |
hapart = subpath (3,6) of ha; |
| 96 |
drawarrow hapart withpen pencircle scaled 1.3pt; |
| 97 |
fill buildcycle( vaa, hb, vb, reverse hapart ) withcolor 0.5white; |
| 98 |
plb = thelabel.llft( labrb, rp(lpos) ); |
| 99 |
pls = thelabel.lrt( labrs, rp(hpos) ); |
| 100 |
boxit.bb( plb ); |
| 101 |
boxit.bs( pls ); |
| 102 |
unfill bpath bb; |
| 103 |
unfill bpath bs; |
| 104 |
drawboxed( bb, bs ); |
| 105 |
endfig; |
| 106 |
|
| 107 |
verbatimtex |
| 108 |
\end{document} |
| 109 |
etex |
| 110 |
|
| 111 |
end; |
| 112 |
|