| 1 |
input geom2d; |
| 2 |
|
| 3 |
labeloffset := 6; |
| 4 |
gddU:=1.2cm; |
| 5 |
|
| 6 |
vardef r(expr t) = cos(2t)+cos(t)*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 |
a = arccos(1/sqrt(3)); |
| 12 |
|
| 13 |
beginfig(1); |
| 14 |
Repere(10,8,5,4,2,2); |
| 15 |
Axes; |
| 16 |
Debut; |
| 17 |
Graduations; Unites(1); |
| 18 |
drawoptions(withcolor LightBlue); |
| 19 |
|
| 20 |
nb = 60; |
| 21 |
pas = 2Pi/ nb; |
| 22 |
for i:=0 upto nb: |
| 23 |
trace (0,0) -- rp(i*pas); |
| 24 |
endfor; |
| 25 |
|
| 26 |
traceDoubleVecteur((0,0),0.5(cos(a),sin(a))) avecCrayon(1,MediumVioletRed); |
| 27 |
traceDoubleVecteur((0,0),0.5(-cos(a),sin(a))) avecCrayon(1,MediumVioletRed); |
| 28 |
traceDoubleVecteur((2,0),(0,0.5)) avecCrayon(1,MediumVioletRed); |
| 29 |
traceDoubleVecteur((-2,0),(0,0.5)) avecCrayon(1,MediumVioletRed); |
| 30 |
traceDoubleVecteur((0,1),(0.5,0)) avecCrayon(1,MediumVioletRed); |
| 31 |
traceDoubleVecteur((0,-1),(-0.5,0)) avecCrayon(1,MediumVioletRed); |
| 32 |
|
| 33 |
trace CourbeEnPolaires(r,-Pi,Pi,150) avecCrayon(1.5,DarkOliveGreen); |
| 34 |
|
| 35 |
pointe Point(0,0); |
| 36 |
pointe Point(0,1); |
| 37 |
pointe Point(0,-1); |
| 38 |
pointe Point(2,0); |
| 39 |
pointe Point(-2,0); |
| 40 |
|
| 41 |
Fin; |
| 42 |
endfig; |
| 43 |
|
| 44 |
end |