# renne.py

Created by florian-allard

Created on December 17, 2020

3.05 KB

Morceau de participation pour le Concours de Noël 2020 organisé par Casio.

```from turtle import *
hideturtle()
penup()
goto(80,-30)
pendown()
#4ème patte
rt(40)
penup()
for i in range(30):
fd(1/2)
lt(1/2)
pendown()
for i in range(30):
fd(2)
rt(3-i/15)
for j in range(4):
for i in range(10):
fd(1)
lt(3)
lt(60)
lt(120)
for i in range(10):
fd(1)
rt(3)
lt(110)
for i in range(20):
fd(2)
rt(1.5)
#fd(30)
lt(50)
for i in range(25):
fd(1.2)
rt(2)
for i in range(15):
fd(2)
lt(3)
for i in range(30):
rt(12)
fd(1)
for i in range(15):
fd(2)
lt(4)
for i in range(30):
fd(2)
rt(i//10)
lt(30)
for i in range(40):
fd(1)
rt(i//10)
penup()
fd(-15)
pendown()#les oreilles
for i in range(40):
fd((400-10*i)//160)
lt(4)
lt(290)
#for i in range(42):
#fd((10*i)//160)
#lt(4.2)
#penup()
#for i in range(42):
#fd(-(10*(28-i))//160)
#lt(-4.2)
#pendown()
for i in range(40):
fd((10*i)//160)
lt(4)
penup()
rt(90)
#fd(5)
lt(90)
fd(-5)
pendown()
#les bois
#penup()
rt(110)
fd(2)
#pendown()
rt(90)
for i in range(20):
fd(2)
rt(1)
lt(20)
for j in range(3):
rt(90)
#for i in range(20):
#fd(3)
#lt(2+20-2*i)
for i in range(10):
fd(3)
lt(2+10-i)
for i in range(4):
fd(1)
lt(36)
lt(10)
for i in range(9):
fd(2)
rt(1+2*i)
lt(40)
for i in range(80):
fd(1)
rt(2)
for i in range(10):
fd(1)
lt(18)
for i in range(30):
fd(1)
lt(1)
for i in range(20):
fd(1)
rt(3)
#fin des bois
penup()
fd(15)
lt(90)
fd(2)
pendown()
pensize(2)
for j in range(2):
for i in range(40):
fd(1/6)
rt(3)
rt(60)
pensize(1)
penup()
fd(15)
lt(90)
fd(2)
lt(75)

pendown()
rt(60)
for i in range(20):
fd(1)
lt(2)
lt(40)
for i in range(30):
fd(1)
rt((30-i)//7)
lt(70)
for j in range(4):
for i in range(10):
fd(1)
lt(5)
lt(40)
rt(0)
#for j in [1,-1]:
#for i in range(30):
#fd(j)
#lt(4*j)
fd(5)
rt(50)
fd(2)
lt(70)
for i in range(25):
fd(2)
lt((50-5*i)/3.7)
lt(70)
for j in range(2):
for i in range(10):
fd(2)
rt(2)
lt(40)
rt(50)
fd(7)
fd(-7)
rt(40)
#1ère patte
for j in range(2):
for i in range(30):
fd(1)
rt(1)
lt(70)
lt(20)
fd(10)
rt(200)
for j in range(4):
for i in range(10):
fd(1)
lt(3)
lt(60)
lt(100)
for j in range(2):
for i in range(30):
fd(-1)
rt(-1)
rt(70)
penup()
#2ème patte
#lt(90)
fd(15)
#pendown()
lt(100)
pendown()
for j in range(2):
for i in range(30):
fd(1)
rt(1)
lt(50)
lt(30)
fd(10)
rt(190)
for j in range(4):
for i in range(10):
fd(1)
lt(3)
lt(60)
lt(100)
for j in range(2):
for i in range(30):
fd(-1)
rt(-1)
rt(60)
#bas du corps
rt(90)
fd(5)
fd(-5)
rt(120)
for i in range(50):
fd(1)
lt(1/4)
lt(90)
penup()
fd(15)
pendown()
rt(190)
#3ème patte
for i in range(40):
fd(1)
lt(2-i/20)
rt(0)
for i in range(30):
fd(1)
rt((100-3*i)/30)
lt(0)
for j in range(4):
for i in range(10):
fd(1)
lt(3)
lt(60)
lt(120)
for i in range(10):
fd(1)
rt(3)
lt(90)
for i in range(30):
fd(1)
lt(1)
lt(10)
for i in range(30):
fd(1)
rt(1+i//15)
rt(20)
for i in range(30):
fd(1)
lt(1+i//15)```