neigerecurvive.py

Created by schraf

Created on December 17, 2021

459 Bytes

Lancez le programme et attendez 15 à 20 minutes pour voir le résultat final (Pour les personnes pressées)

Version sonore accélérée 80 fois sur ma chaine Youtube


from kandinsky import fill_rect
from turtle import *

def flocon(n):
 if n == 0: return
 else:
  setheading(90)
  for i in range(12):
   forward(3*n)
   penup()
   x,y = position()
   a = heading()
   forward(16*n)
   pendown()
   flocon(n-1)
   penup()
   goto(x,y)
   setheading(a)
   backward(3*n)
   pendown()
   right(30)
 return        

fill_rect(0,0,320,222,(0,0,0))
color(255,255,255)
speed(0)
pensize(1)
flocon(4)
hideturtle()

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.