| 1 |
% rigorouscircle.mp |
| 2 |
% L. Nobre G. |
| 3 |
% 2003 |
| 4 |
|
| 5 |
input featpost3Dplus2D; |
| 6 |
|
| 7 |
f := (2,0.2,0.1); |
| 8 |
|
| 9 |
|
| 10 |
beginfig(1); |
| 11 |
numeric ind, cray, sray, cnum, ang, aux, auxs; |
| 12 |
color sidevec, rayvec, angulmomv, vecaux; |
| 13 |
path paux; |
| 14 |
pen pendot; |
| 15 |
pendot = pencircle scaled 2pt; |
| 16 |
sray = 1; |
| 17 |
cnum = 8; |
| 18 |
ang = 45; |
| 19 |
auxs = 0.15; |
| 20 |
ray = 3*cosd(ang)*sray/cnum; |
| 21 |
sidevec = ( sray*sind(ang), 0, 0 ); |
| 22 |
for ind=1 upto cnum: |
| 23 |
aux := ind*360/cnum; |
| 24 |
% draw rigorouscircle( black, (0,sind(aux),cosd(aux)), sray ) dashed evenly; |
| 25 |
rayvec := sray*cosd(ang)*(0,cosd(aux),sind(aux)); |
| 26 |
|
| 27 |
vecaux := rayvec+sidevec; |
| 28 |
drawarrow rp(black)--rp(vecaux+auxs*N(vecaux)); |
| 29 |
paux := rigorouscircle( vecaux, vecaux, ray ); |
| 30 |
draw paux; |
| 31 |
drawoptions( withpen pendot ); |
| 32 |
drawarrow (subpath (0,1) of paux); |
| 33 |
draw rp(vecaux); |
| 34 |
drawoptions(); |
| 35 |
|
| 36 |
vecaux := rayvec-sidevec; |
| 37 |
drawarrow rp(black)--rp(vecaux+auxs*N(vecaux)); |
| 38 |
paux := rigorouscircle( vecaux, vecaux, ray ); |
| 39 |
draw paux; |
| 40 |
drawoptions( withpen pendot ); |
| 41 |
drawarrow (subpath (0,1) of paux); |
| 42 |
draw rp(vecaux); |
| 43 |
drawoptions(); |
| 44 |
endfor; |
| 45 |
endfig; |
| 46 |
|
| 47 |
end; |
| 48 |
|
| 49 |
|