| 1 |
input geom2d; |
| 2 |
|
| 3 |
labeloffset := 6; |
| 4 |
gddU:=1.2cm; |
| 5 |
|
| 6 |
vardef r(expr t) = 1+2*cos(t) enddef; |
| 7 |
vardef rp(expr t) = (r(t)*cos(t),r(t)*sin(t)) enddef; |
| 8 |
|
| 9 |
def traceDoubleVecteur(expr o,d)= drawdblarrow ((o-d)--(o+d)) gddEnPlace enddef; |
| 10 |
|
| 11 |
beginfig(1); |
| 12 |
Repere(10,10,2.2,5,2,2); |
| 13 |
Axes; |
| 14 |
Debut; |
| 15 |
Graduations; Unites(1); |
| 16 |
drawoptions(withcolor LightSlateGrey); |
| 17 |
|
| 18 |
nb = 50; |
| 19 |
pas = 4 / nb; |
| 20 |
for i=1 upto nb: |
| 21 |
vardef rt(expr t) = 1 + (-1+i*pas)*cos(t) enddef; |
| 22 |
trace CourbeEnPolaires(rt,-Pi,Pi,100) withcolor ((i/nb)[Gainsboro,Chartreuse]); |
| 23 |
endfor; |
| 24 |
|
| 25 |
trace CourbeEnPolaires(r,-Pi,Pi,100) avecCrayon(1.5,LightSeaGreen); |
| 26 |
|
| 27 |
pointe Point(0,0); |
| 28 |
pointe Point(0,1); |
| 29 |
pointe Point(0,-1); |
| 30 |
|
| 31 |
Fin; |
| 32 |
endfig; |
| 33 |
end |