Le rapporteur :
Voici son code :
u:=1cm; figure (-8u,-8u,10u,8u); numeric r; r:=8; pair O,I,II; O:=(0,0); I:=(r*u,0); II:=(-r*u,0); marque_p :="croix"; MarquePoint(O); trace arccercle(I,II,O); numeric ang; ang := 20; pair J,JJ; J:=I rotatedaround(O,-ang); JJ:=II rotatedaround(O,ang); trace arccercle(J,I,O); trace arccercle(II,JJ,O); draw J--JJ; pair K,KK; K:=((r-3)*u,0); KK:=(-(r-3)*u,0); trace arccercle(K,KK,O); draw K--KK; %-----------graduations extérieures pair a[],b[]; for i:=0 upto 17: a[i]:= ((r-0.7)*u,0) rotatedaround(O,i*10); b[i]:= (r*u,0) rotatedaround(O,i*10); draw a[i]--b[i] withpen pencircle scaled 1.5bp; if (i<>9) : label(TEX("{\bf"& decimal(180-i*10)&"}"),((r-1)*u,0)) rotatedaround(((r-1)*u,0),-90) rotatedaround(O,i*10); fi; a[i]:= ((r-0.5)*u,0) rotatedaround(O,i*10+5); b[i]:= (r*u,0) rotatedaround(O,i*10+5); draw a[i]--b[i] withpen pencircle scaled 1.5bp; for j:=1 upto 4: a[j]:= ((r-0.3)*u,0) rotatedaround(O,i*10+j); b[j]:= (r*u,0) rotatedaround(O,i*10+j); draw a[j]--b[j] withpen pencircle scaled 1.5bp; endfor; for j:=6 upto 9: a[j]:= ((r-0.3)*u,0) rotatedaround(O,i*10+j); b[j]:= (r*u,0) rotatedaround(O,i*10+j); draw a[j]--b[j] withpen pencircle scaled 1.5bp; endfor; endfor; i:=18; a[i]:= ((r-0.7)*u,0) rotatedaround(O,i*10); b[i]:= (r*u,0) rotatedaround(O,i*10); draw a[i]--b[i] withpen pencircle scaled 1.5bp; label(TEX("{\bf"& decimal(180-i*10)&"}"),((r-1)*u,0)) rotatedaround(((r-1)*u,0),-90) rotatedaround(O,i*10); %-----------graduations intérieures for i:=0 upto 17: a[i]:= ((r-2.3)*u,0) rotatedaround(O,i*10); b[i]:= ((r-3)*u,0) rotatedaround(O,i*10); draw a[i]--b[i] withpen pencircle scaled 1bp; if (i<>9) : label(TEX("{\bf"& decimal(i*10)&"}"),((r-2)*u,0)) rotatedaround(((r-2)*u,0),-90) rotatedaround(O,i*10); fi; a[i]:= ((r-2.5)*u,0) rotatedaround(O,i*10+5); b[i]:= ((r-3)*u,0) rotatedaround(O,i*10+5); draw a[i]--b[i] withpen pencircle scaled 1bp; for j:=1 upto 4: a[j]:= ((r-2.7)*u,0) rotatedaround(O,i*10+j); b[j]:= ((r-3)*u,0) rotatedaround(O,i*10+j); draw a[j]--b[j] withpen pencircle scaled 1bp; endfor; for j:=6 upto 9: a[j]:= ((r-2.7)*u,0) rotatedaround(O,i*10+j); b[j]:= ((r-3)*u,0) rotatedaround(O,i*10+j); draw a[j]--b[j] withpen pencircle scaled 1bp; endfor; endfor; i:=18; a[i]:= ((r-2.3)*u,0) rotatedaround(O,i*10); b[i]:= ((r-3)*u,0) rotatedaround(O,i*10); draw a[i]--b[i] withpen pencircle scaled 1bp; label(TEX("{\bf"& decimal(180)&"}"),((r-2)*u,0)) rotatedaround(((r-2)*u,0),-90) rotatedaround(O,i*10); %gradution du 90 draw (0,(r-1)*u)--(0,(r-0.7)*u) withpen pencircle scaled 1.5bp; draw (0,(r-2)*u)--(0,(r-2.3)*u) withpen pencircle scaled 1bp; label(TEX("{\bf"& decimal(90)&"}"),((r-1.5)*u,0)) rotatedaround(((r-1.5)*u,0),-90) rotatedaround(O,90); %-----------graduations horizontales for i:=-7 upto 6: a[i]:= (i*u,ypart.JJ); b[i]:= (i*u,ypart.JJ+0.7u); draw a[i]--b[i]; label.top(TEX("{"& decimal(i)&"}"),b[i]); a[i]:= (i*u+0.5u,ypart.JJ); b[i]:= (i*u+0.5u,ypart.JJ+0.5u); draw a[i]--b[i]; for j:=1 upto 4: a[j]:= (i*u+0.1*j*u,ypart.JJ); b[j]:= (i*u+0.1*j*u,ypart.JJ+0.3u); draw a[j]--b[j]; endfor; for j:=6 upto 9: a[j]:= (i*u+0.1*j*u,ypart.JJ); b[j]:= (i*u+0.1*j*u,ypart.JJ+0.3u); draw a[j]--b[j]; endfor; endfor; i:=7; a[i]:= (i*u,ypart.JJ); b[i]:= (i*u,ypart.JJ+0.7u); draw a[i]--b[i]; label.top(TEX("{"& decimal(i)&"}"),b[i]); %trait du O draw O--(0,-u); fin;
La règle :
Voici son code :
u:=1cm; figure (-8u,-8u,20u,8u); numeric la,lo; la:=4; lo:=16; pair A,B,C,D; A:=(0,0); B:=(lo*u,0); C:=(lo*u,la*u); D:=(0,la*u); numeric r; r:=0.3; draw A shifted(r*u,0)--B shifted(-r*u,0)..B shifted(-0.1u,0.1u)..B shifted(0,r*u)--C shifted(0,-r*u) ..C shifted(-0.1u,-0.1u)..C shifted(-r*u,0)--D shifted(r*u,0)..D shifted(0.1u,-0.1u)..D shifted(0,-r*u) --A shifted(0,r*u)..A shifted(0.1u,0.1u)..A shifted(r*u,0); draw D shifted(0,-1.5u)--C shifted(0,-1.5u) withcolor (0.5,0.5,0.5) withpen pencircle scaled 0.5bp; %-----------graduations horizontales pair a[],b[]; for i:=0 upto (lo-2): a[i]:= (i*u+0.5u,ypart.D); b[i]:= (i*u+0.5u,ypart.D-0.7u); draw a[i]--b[i]; label.bot(TEX("{"& decimal(i)&"}"),b[i]); a[i]:= (i*u+u,ypart.D); b[i]:= (i*u+u,ypart.D-0.5u); draw a[i]--b[i]; for j:=1 upto 4: a[j]:= (i*u+0.1*j*u+0.5u,ypart.D); b[j]:= (i*u+0.1*j*u+0.5u,ypart.D-0.3u); draw a[j]--b[j]; endfor; for j:=6 upto 9: a[j]:= (i*u+0.1*j*u+0.5u,ypart.D); b[j]:= (i*u+0.1*j*u+0.5u,ypart.D-0.3u); draw a[j]--b[j]; endfor; endfor; i:=lo-1; a[i]:= (i*u+0.5u,ypart.D); b[i]:= (i*u+0.5u,ypart.D-0.7u); draw a[i]--b[i]; label.bot(TEX("{"& decimal(i)&"}"),b[i]); fin;
L’équerre :
Voici son code :
u:=1cm; figure (-8u,-15u,20u,8u); numeric la,lo; la:=10; lo:=16; pair A,B,C,D; A:=(0,0); B:=(lo*u,0); C:=(lo*u,-u); D:=(0,-la*u); numeric r; r:=0.3; draw A shifted(r*u,0)--B shifted(-r*u,0)..B shifted(-0.1u,-0.1u)..B shifted(0,-r*u)--C --D--A shifted(0,-r*u) ..A shifted(0.1u,-0.1u)..A shifted(r*u,0); pair CC; CC=whatever[A,B]; CC=whatever[C,D]; pair V; V:=(2u,-2u); numeric r; r:=0.5; pair CCC,DDD; CCC:=r[A,CC]; DDD:=r[A,D]; draw A shifted V--CCC shifted V -- DDD shifted V--A shifted V; %draw D shifted(0,-1.5u)--C shifted(0,-1.5u) withcolor (0.5,0.5,0.5) withpen pencircle scaled 0.5bp; %-----------graduations horizontales pair a[],b[]; for i:=0 upto (lo-2): a[i]:= (i*u+0.5u,0); b[i]:= (i*u+0.5u,-0.7u); draw a[i]--b[i]; label.bot(TEX("{"& decimal(i)&"}"),b[i]); a[i]:= (i*u+u,0); b[i]:= (i*u+u,-0.5u); draw a[i]--b[i]; for j:=1 upto 4: a[j]:= (i*u+0.1*j*u+0.5u,0); b[j]:= (i*u+0.1*j*u+0.5u,-0.3u); draw a[j]--b[j]; endfor; for j:=6 upto 9: a[j]:= (i*u+0.1*j*u+0.5u,0); b[j]:= (i*u+0.1*j*u+0.5u,-0.3u); draw a[j]--b[j]; endfor; endfor; i:=lo-1; a[i]:= (i*u+0.5u,0); b[i]:= (i*u+0.5u,-0.7u); draw a[i]--b[i]; label.bot(TEX("{"& decimal(i)&"}"),b[i]); fin;