Programme p5Visuel monCanvas x x1 y1 x2 y2 x3 y3 n a1 a2 a3 b1 b2 b3 niveau glissiere info actions initiales Fonction exécutée une fois, au départ h1 Triangle de Sierpinski Déterminer le niveau via la glissière ci-dessous glissiere 0 7 0 1 info p Valeur 1000 1000 sierpinski Trace le triangle de Sierpinski a1 a2 a3 b1 b2 b3 a1 DIVIDE 1 ADD 1 x1 1 x3 2 b1 DIVIDE 1 ADD 1 y1 1 y3 2 a2 DIVIDE 1 ADD 1 x2 1 x3 2 b2 DIVIDE 1 ADD 1 y2 1 y3 2 a3 DIVIDE 1 ADD 1 x1 1 x2 2 b3 DIVIDE 1 ADD 1 y1 1 y2 2 GT n 0 a1 b1 a2 b2 a3 b3 MINUS 1 n 1 a1 b1 a2 b2 x3 y3 MINUS 1 n 1 x1 y1 a3 b3 a1 b1 MINUS 1 n 1 a3 b3 x2 y2 a2 b2 actions en boucle Fonction exécutée périodiquement 230 230 230 255 glissiere info Valeur : glissiere tracerFigure Fonction appelée périodiquement, par la fonction draw 52 900 948 900 500 124 niveau 52 900 948 900 500 124 triangle Trace un triangle 0 x1 0 y1 0 x2 0 y2 0 x3 0 y3 0 x1 0 y1