***** ***** les angles : - Construction d'un carré, d'un losange, d'un parallélogramme, d'un triangle équilatéral... - faire doubler une tortue par une autre, ** pour dépassement vg à 1 lc av 50 à 0 av 25 tg 70 av 25 td 70 av 100 td 70 av 25 tg 70 av 200 fin ** - utiliser une image de fond de type carte de France (voir le fichier : plan de vol 5b.trt) ***** ***** Le maillot symétrie centrale et axiale ***** pour maillot tlp 40 -40 av 80 td 135 diag:=sqrt(2) av 20*diag tg 90 av 2*diag*10 tg 90 av 4*diag*10 tg 45 av 30 tg 45 av 10*diag td 90 av 10*diag tg 45 av 30 tg 45 av 40*diag tg 90 av 20*diag tg 90 av 20*diag td 135 av 80 tg 90 av 80 tlp 0 0 fin ***** ***** pythagore cosinus (avec l'échelle par exemple) trigonométrie *** pour pose_d_une_échelle rz td 90; av 500;tlp 0 0 rep 2 [ av 500;tg 90;av 50;tg 90 ] // tracer une échelle de "200" posée contre le mur avec un angle de 70° fin ***** ***** nombres relatifs *** partie procédures : pour place x:=0 rep 5 [ à x; tlp -100+x*50 0; x:=x+1 ] fin partie commandes : rz place à 0 av 100 à 1 av 50 à 2 av 0 à 3 av -50 à 4 av -100 rz place à 0 re 100 à 1 re 50 à 2 re 0 à 3 re -50 à 4 re -100 ***** ***** mélange de nombres relatifs, coordonnées et calculs d'hypoténuses : La course au drapeau 4me et 3me ***** pour drapeau lc av 0.0005 td 90 bc av 0.0005 rep 4 [ td 90;av 0.001 ] re 0.0005 tg 90 av 15 rep 3 [ td 120;av 5 ] lc re 15.0005 ct fin pour ava a av a/2 ; écris a;av a/2 fin pour parcours rz à 1;tlp 80 0 ;écris '1;drapeau à 2;tlp 180 0 ;écris '2;drapeau à 3;tlp 180 60 ;écris '3;drapeau à 4;tlp 180 100 ;écris '4;drapeau à 5;tlp 210 150 ;écris '5;drapeau à 6;tlp 150 210 ;écris '6;drapeau à 7;tlp 50 140 ;écris '7;drapeau à 8;tlp -50 140 ;écris '8;drapeau à 9;tlp -200 30 ;écris '9;drapeau à 10;tlp -200 -40 ;écris '10;drapeau à 11;tlp -10 -140 ;écris '11;drapeau à 12;tlp 20 -30 ;écris '12;drapeau à 13;tlp -30 20 ;écris 'arrivée;drapeau à 0 td 90; ava 80 //il faut écrire la suite fin ***** Suite pour les rapides pour course rz rep 4 [ av 150;td 90 ] tlp 80 150 rep 4 [ av 50;td 90 ] fin ***** ***** étoiles (polygones réguliers) (avec moodle) ***** ***** perspective ***** pour maison a av a tg 30 av a tg 120 av a tg 30 av a tg 90 av a tg 90 fin pour rue a ct x:=a tant_que (x>10) [ maison x; td 60; av x; tg 60; x:=x*0.8; rue x] fin commandes -> rue 100 ***** ***** 3d boite avec volume maximal ***** pour face longueur hauteur av longueur pvh 90 av hauteur pvh 90 av longueur pvh 90 av hauteur pvh 90 av longueur fin pour boite longueur largeur hauteur rep 2 [face longueur hauteur; td 90; face largeur hauteur; td 90] fin pour boites longueur largeur pas ct L:=longueur l:=largeur i:=0 rep floor(l/(2*pas)) [ tlp i i 0;boite L-2*i l-2*i i;pause 1;i:=i+pas] fin pour b h tlp h h 0;boite 300-2*h 200-2*h h fin -> commandes : vg b 0 b 13 b 50 b 34 boites 300 200 10 ***** ***** les prismes droits ***** ***** statistiques : tracés de diagramme à barres, en bâtons, circulaires... boite à moustaches... ***** ***** les unités d'aire et de volume. ***** pour cmcarré côté rep 4 [ av côté; td 90 ] fin pour dmcarré a b x:=a y:=b rep 10 [rep 10 [tlp x y; cmcarré 1;x:=x+1 ];y:=y+1;x:=x-10] fin pour mcarré a:=0 b:=0 rep 10 [rep 10 [tlp a b; dmcarré a b;a:=a+10 ];b:=b+10;a:=0] fin ***** pour carré a rep 4 [ av a; pvh 90 ] fin pour cube a rep 4 [ carré a;av a;tg 90 ] fin pour cube_découpé ct a:=0 b:=0 c:=0 rep 10 [rep 10 [rep 10 [tlp a b c; cube 10;a:=a+10 ];b:=b+10;a:=a-100];b:=b-100;c:=c+10] fin -> commandes rz carré 100 cube 100 cube_découpé ***** ***** section de cube ***** pour carré a rep 4 [ av a; pvh 90 ] fin pour cube a rep 4 [ carré a;av a;tg 90 ] fin pour section_cube rz cube 100 tlp 0 50 0 tg 45 fin ***** ***** probabilités avec les fonctions rand et alea ***** ***** pyramide en pièces de 5 cts : http://www.pedagogie.ac-nantes.fr/63467896/0/fiche___ressourcepedagogique/&RH=1197471441578 ***** ***** tracé de courbes (trajectoires) et animation ***** pour carré rep 4 [ av 2; td 90 ] fin pour trajectoire rz def f:x->-x*(x-200)/50 x:=0 rep 200 [ tlp x f(x); carré;x:=x+1] fin pour animation rz ct def f:x->-x*(x-200)/50 x:=0 rep 200 [ tlp x+100 f(x); carré;x:=x+1;pause 0.04;rz;ct] fin ***** ***** approximation du graphe d'une fonction avec la connaissance de sa dérivée ***** pour trace pas nbredefois rz //mg// //mg translation -200 -150// à toutes tlp 0 0 ct à 1 crayon rouge def d:x->1 abscisse:=0 rep nbredefois [étape pas] fin pour étape pas à 0 td 90 av pas tg 90 av d(abscisse)*pas abscisse:=abscisse+pas à 1 vise 0 av dist(0,1) fin commandes -> trace 1 200 ***** ***** PGCD ***** pour pgcd a b x:=a y:=b si (yn alors [ td 180] si a!=n alors fleche si a>n alors [ td 180] écris a si a==n alors [tlp 0 (n-50); td 90;crayon rouge;av (p+1)*10;crayon vert;rep 8 [ td 45; fleche ];lc;av 20;écris bravo !!] m:=a p:=p+1 fin commandes -> début tester 50 ***** ***** marche aléatoire ***** pour trajets nbredepas nbredefois compteur:=0 rz à 1 ct crayon vert av 10*nbredepas maison rep nbredefois [ à 0;tlp 0 0; rep nbredepas [ pas ]; si dist(0,1)<=0.1 alors [pause 0.5;av 15;pause 0.5;compteur:=compteur+1] ] fréquence:=compteur/nbredefois aff fréquence fin pour pas à 0 av 10 td 90+(alea(2)-1)*180 av 20 boussole fin pour maison lc av 10 bc td 90 av 10 tg 90 av 20 tg 30 av 20 tg 120 av 20 tg 30 av 20 tg 90 av 10 tg 90 lc re 10 fin commandes -> trajets 10 50 ***** ***** conjecture de syracuse ***** pour bou x n:=x av (n-m) écris n td 90 av 20 tg 90 m:=n si (reste(n,2)==0 && n!=1) alors (bou n/2) sinon (si n!=1 alors (bou 3*n+1)) fin pour test n rz ct m:=0 bou n fin ***** ***** les clothoïdes ***** pour clothoïde_école x:=1 ; tant_que (x<50) [ av 10;td x;x:=x+1 ] fin pour clothoïde_collège d a k c // distance parcourue, angle de référence, fraction de l'angle, nombre d'étapes // 10 1 10 200 pour essayer si (c>0) alors [av d; td a/k; clothoïde_collège d a+1 k c-1] fin ***** ***** Travail de Gilles Maréchal et ses élèves ***** pour escalier1 rep 4 [ av 120; td 90 ] fin pour escalier2 av 60; td 90 av 60; tg 90 av 120; td 90 av 60; td 90 av 180; td 90 av 120; td 90 fin pour escalier3 av 60; td 90 av 60; tg 90 av 90; td 90 av 30; tg 90 av 60; td 90 av 30; td 90 av 210; td 90 av 120; td 90 fin pour escaliers lc; re 180; tg 90; av 240; td 90; bc escalier1 lc; td 90; av 180; tg 90; bc escalier2 lc; td 90; av 180; tg 90; bc escalier3 fin pour escaliermorgane n ct x:=1 k:= n l:= 1 tant_que (k>=1) [ x:= 100/2^l ; av x ; td 90 ; av x ; tg 90 ; av x ; l:=l+1 ; k:= k-1 ] av 100/2^(l-1) td 90 av x td 90 av 100*(1-0.5^n)+100 td 90 av 100 fin ***** pour dentiolite1 n av 100 rep n [ tg (180 - atan (1/n)) ; av ((50/n)*sqrt(n^2+1)) ; td 2*(90-atan(1/n)) ; av ((50/n)*sqrt(n^2+1)) ; td atan(1/n) ] tg 180 av 100 rep n [ tg atan(1/n) ; av ((50/n)*sqrt(n^2+1)) ; tg 2*(90-atan(1/n)) ; av ((50/n)*sqrt(n^2+1)) ; td (180 -atan(1/n))] fin pour parad l td 90 tg atan(1/4) av l*(((1/8)^2+(1/32)^2)^(1/2)) tg (atan(3/4)-atan(1/4)) av l*(((1/8)^2+(3/32)^2)^(1/2)) tg (atan(5/4)-atan(3/4)) av l*(((1/8)^2+(5/32)^2)^(1/2)) tg (atan(7/4)-(atan(5/4))) av l*(((1/8)^2+(7/32)^2)^(1/2)) fin pour parag l tg 90 td atan(1/4) av l*(((1/8)^2+(1/32)^2)^(1/2)) td (atan(3/4)-atan(1/4)) av l*(((1/8)^2+(3/32)^2)^(1/2)) td (atan(5/4)-atan(3/4)) av l*(((1/8)^2+(5/32)^2)^(1/2)) td (atan(7/4)-(atan(5/4))) av l*(((1/8)^2+(7/32)^2)^(1/2)) fin pour dent l parad l lc;td (atan(7/4)); av l/2; td 90; av l/2; tg 180; bc; parag l fin pour dentiolite2 l dent l tg atan(7/4) lc; av l/2; tg 90; av l/2; bc; av l; td 180 dent l tg (atan(7/4)+180) lc; av l/2; tg 90; re l/2; bc; av l fin ***** pour segment0 l av l/5; td 90 rep 2 [av l/5; tg 90] av l/5; td 90 av l/5; tg 90 rep 2 [ av l/5; td 90] av l/5; tg 90; av l/5 fin pour carre0 l rep 4 [ segment0 l; td 90 ] fin pour segment l n si n==0 alors [ av l ] sinon [ segment l/5 n-1 tg 90; segment l/5 n-1 td 90; segment l/5 n-1 td 90; segment l/5 n-1 tg 90; segment l/5 n-1 td 90; segment l/5 n-1 tg 90; segment l/5 n-1 tg 90; segment l/5 n-1 td 90; segment l/5 n-1 ] fin pour carre l n rep 4 [segment l n; td 90 ] fin pour carres vg; lc; tg 90; av 300; td 90; bc; carre 100 0; lc; td 90; av 200; tg 90; bc; carre 100 1; lc; td 90; av 200; tg 90; bc; carre 100 2 fin ***** pour hexa l n si n==0 alors [ av l ] sinon [ hexa l/5 n-1 tg 120 hexa l/5 n-1 rep 4 [ td 60; hexa l/5 n-1] tg 120 hexa l/5 n-1 td 120 hexa l/5 n-1 rep 4 [ tg 60; hexa l/5 n-1 ] td 120 hexa l/5 n-1] fin pour quitterie l n rep 6 [ hexa l n; td 60 ] fin ***** pour trou r d a f:= r-d b:= (180-a)/2 l:= 2*d*sin(a/2) palette RVB 255 0 0 td 180; av f tg b; av l tg b; av f fin pour bosse r d a n:=a g:= r-d-2*r*sin(a/2) b:= (180-a)/2 l:= 2*d*sin(a/2) s:=2*r*sin(a/2) c:=a/n palette RVB 0 0 255 rep n [ av s; td c ] palette RVB 255 0 0 tg a/2; av g td b; av l td b; av g tg a/2 palette RVB 0 0 255 rep n [ av s; td c ] fin pour figure r d a ct trou r d a td a/2 bosse r d a tg 180-(a/2) fin pour Fleur r d p a:= 180/p rep (180/a) [ figure r d a ] lc tg 180; av 320 td 90; av 80; tg 90 bc écris nombre de pétales = p lc av 15; tg 90; av 30; td 90 bc écris rayon = r lc av 15; td 90; av 15; tg 90 bc écris rayon central = d fin ***** pour trapèzeg l n si n==0 alors [ av l ] sinon [ tg 60 trapèzeg l/2 n-1 td 60 trapèzed l/2 n-1 td 60 trapèzeg l/2 n-1 tg 60] fin pour trapèzed l n si n==0 alors [ av l ] sinon [ td 60 trapèzed l/2 n-1 tg 60 trapèzeg l/2 n-1 tg 60 trapèzed l/2 n-1 td 60] fin pour hexa l n si n==0 alors [ av l ] sinon [ trapèzeg l/2 n-1 td 60 trapèzed l/2 n-1 ] fin pour hexagone l n rep 3 [ td 60;hexa l n ] fin ***** pour segment l n si n==0 alors [ av l ] sinon [ segment l/11 n-1 av 2*l/11 tg 135; segment l/11 n-1 td 45; segment l/11 n-1 td 45; segment l/11 n-1 td 45; segment l/11 n-1 td 45; segment l/11 n-1 td 45; segment l/11 n-1 td 45; segment l/11 n-1 tg 135; segment l/11 n-1 av 2*l/11 td 135; segment l/11 n-1; tg 45; segment l/11 n-1 tg 45; segment l/11 n-1 tg 45; segment l/11 n-1 tg 45; segment l/11 n-1 tg 45; segment l/11 n-1 tg 45; segment l/11 n-1 td 135; segment l/11 n-1] av 2*l/11 fin pour octogone l n rz rep 8 [segment l n; td 45 ] fin ***** ***** du site géotortue ***** pour arbre_pythagore c lc si (c>1) alors [ carré c av c; tg 45 arbre_pythagore c/sqrt(2) td 90; av c/sqrt(2) arbre_pythagore c/sqrt(2) td 90; av c/sqrt(2);td 45 av c; td 90;av c;td 90 ] fin pour carré c palette RVB c+50 150-c c/4 remplis [ rep 4 [ av c;td 90 ] ] fin pour arbre_binaire c si (c>1) alors [ av c; tg 45 arbre_binaire c/2 td 90 arbre_binaire c/2 tg 45; re c ] fin *****