main_blitzstream.py

Created by kml-style

Created on March 20, 2021

2.61 KB


## IMPORTATION DES MODULES ##
# Module 'Turtle' → Dessin ##
from turtle import *       ##
# Module 'Kandinsky' → Texte #
from kandinsky import *    ##
#############################

## REGLAGES ##
hideturtle() # Cache la tortue #
speed(10) # Vitesse maximale #
penup()   
goto(-140,40) # Place le stylo au centre #
pendown()

## PARTIE PRINCIPALE DE LA MAIN ##
forward(90)
right(45)
forward(60)
right(60)
forward(40)
for i in range(180):
  right(1)
  forward(0.1)
xpion,ypion=position() # POINT HAUT-DROITE DU PION
forward(30)  
left(135)
forward(10)
left(55)
forward(30)
for i in range(180):
  right(1)
  forward(0.1)
forward(32)
x,y=position()
left(60)
forward(20)
right(55)
forward(20)
left(90)
forward(20)
penup()
goto(x,y)
pendown()
for i in range(180):
  left(1)
  forward(0.07)
x1,y1=position()  # Point de depart pour les doigts #
penup()
forward(10)
pendown()
left(30)
forward(8)
penup()

## DOIGTS ##
goto(x1,y1)
pendown()
left(180)
forward(5)
for i in range(170):
  left(1)
  forward(0.07)
x2,y2=position()  # Point deuxieme doigt #
penup()
forward(10)
pendown()
forward(8)
penup()
goto(x2,y2)
pendown()
left(180)
forward(5)
for i in range(180):
  left(1)
  forward(0.07)
penup()
forward(10)
pendown()
forward(6)

## PION ##
penup()
# Partie superieure (P4) : #
goto(xpion,ypion-10)
pendown()
f=0.05
while f>0:
  for i in range(360):
    left(1)
    forward(f)
  f-=0.01
penup()
right(90)
forward(3)
pendown()
# P3 : #
u=2
right(90)
forward(2)
right(270)
left(70)
while u>0: # Permet de faire un rectangle plein #
  forward(u*2.5)
  left(90)
  forward(u)
  left(90)
  forward(u*5)
  left(90)
  forward(u)
  left(90)
  forward(u*2.5)  
  u-=0.2
penup()
right(90)
forward(5.5)
pendown()
# P2 : #
u=2
left(90)
while u>0: # Permet de faire un rectangle plein #
  forward(u*1.5)
  left(90)
  forward(u*2)
  left(90)
  forward(u*3)
  left(90)
  forward(u*2)
  left(90)
  forward(u*1.5)
  u-=0.2
penup()
right(90)
forward(5)
pendown()
# Base du pion (P1) : #
u=2
left(90)
while u>0: # Permet de faire un rectangle plein #
  forward(u*3)
  left(90)
  forward(u*1.5)
  left(90)
  forward(u*6)
  left(90)
  forward(u*1.5)
  left(90)
  forward(u*3)
  u-=0.2

forward(180)

## ECRITURE DE 'BLITZSTREAM' ##
draw_string("BLITZ",50,120)
draw_string("STREAM",160,120)

## CREDITS ##
print("Main BLITZSTREAM - by KML_STYLE")
print("Tous droits reservees - FOUNDATION ECO+ ")
print("Pour plus d'informations, rendez-vous sur www.numworks.workshop/python/kml_style")
## FIN DU PROGRAMME ##

########################################
########### FONDATION 'ECO+' ###########
##### BLITZSTREAM LOGO BY KML_STYLE ####
########################################

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.