bap.py

Created by kml-style

Created on November 05, 2020

2.43 KB


from turtle import *
from kandinsky import draw_string
speed(10)
hideturtle()
a=85
for i in range(10):
  penup()
  goto(0,-85+i)
  pendown()
  circle(a)
  a-=1
color('blue')
a=75
for i in range(5):
  penup()
  goto(0,-75+i)
  pendown()
  circle(a)
  a-=1
color('white')
a=70
for i in range(5):
  penup()
  goto(0,-70+i)
  pendown()
  circle(a)
  a-=1
color('red')
a=65
for i in range(5):
  penup()
  goto(0,-65+i)
  pendown()
  circle(a)
  a-=1
penup()
goto(-50,30)
color(255,212,0)
pendown()
forward(25)
right(40)
forward(48)
right(60)
forward(26)
for i in range(180):
  right(1)
  forward(0.08)
xpion,ypion=position() # POINT HAUT-DROITE DU PION
forward(24)  
left(135)
forward(8)
left(55)
forward(24)
for i in range(180):
  right(1)
  forward(0.08)
forward(25.6)
x,y=position()
left(60)
forward(16)
right(55)
forward(16)
left(90)
forward(16)
penup()
goto(x,y)
pendown()
for i in range(180):
  left(1)
  forward(0.056)
x1,y1=position()  # Point de depart pour les doigts #
penup()
forward(8)
pendown()
left(30)
forward(6.4)
penup()
## DOIGTS ##
goto(x1,y1)
pendown()
left(180)
forward(4)
for i in range(170):
  left(1)
  forward(0.056)
x2,y2=position()  # Point deuxieme doigt #
penup()
forward(8)
pendown()
forward(6.4)
penup()
goto(x2,y2)
pendown()
left(180)
forward(4)
for i in range(180):
  left(1)
  forward(0.056)
penup()
forward(8)
pendown()
forward(4.8)
left(180)
## PION ##
penup()
right(180)
# Partie superieure (P4) : #
goto(xpion,ypion-6.4)
pendown()
f=0.04
while f>0:
  for i in range(360):
    left(1)
    forward(f)
  f-=0.008
penup()
right(90)
forward(2.4)
pendown()
# P3 : #
u=1.6
right(90)
forward(1.6)
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=1.6
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.16
penup()
right(90)
forward(4)
pendown()
# Base du pion (P1) : #
u=1.6
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.16
draw_string("BLITZSTREAM",110,5)
draw_string("BRIGADE ANTI-PLEUTRES",60,200)
draw_string("B",190,80)
draw_string("A",190,105)
draw_string("P",190,130)

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.