Python Turtle Drawing - C++ Logo
Source code:
from turtle import *
setup(500,500)
C1 = '#659AD2'
C2 = '#00599C'
C3 = '#004482'
color(C1)
begin_fill()
lt(29.94)
fd(240.11)
lt(89.1)
circle(39.33,27.6)
lt(3.44)
fd(207.34)
lt(8.32)
circle(42.38,43.19)
lt(8.35)
fd(201.55)
rt(3.73)
circle(41.81,63.22)
lt(0.57)
fd(199.3)
lt(1.22)
circle(43.04,28.26)
lt(90.56)
fd(240.29)
end_fill()
color(C2)
begin_fill()
rt(60.08)
fd(240.37)
lt(89.04)
circle(38.3,26.57)
lt(4.44)
fd(205.5)
lt(2.16)
circle(37.3,29.01)
lt(88.77)
fd(240.11)
end_fill()
color(C3)
begin_fill()
lt(0.1)
fd(240.29)
lt(90.21)
circle(42.86,35.06)
rt(5.23)
fd(196.74)
lt(3.54)
circle(41.33,52.75)
lt(3.57)
fd(205.39)
lt(4.52)
circle(38.08,26.47)
lt(89.03)
fd(240.37)
end_fill()
color('white')
up()
rt(120.02)
fd(142.26)
down()
begin_fill()
lt(90)
circle(142.26,300.02)
up()
rt(145.22)
fd(0.02)
down()
rt(124.79)
fd(71.02)
lt(90.01)
circle(-71.25,300.02)
up()
lt(128.85)
fd(0.01)
down()
rt(38.86)
fd(71)
end_fill()
begin_fill()
up()
lt(225.01)
fd(49.18)
down()
lt(105.06)
fd(16)
rt(90)
fd(15.5)
lt(90)
fd(16)
rt(90)
fd(16)
rt(90)
fd(16)
lt(90)
fd(16)
rt(90)
fd(16)
rt(90)
fd(16)
lt(90)
fd(15.5)
rt(90)
fd(16)
rt(90)
fd(15.5)
lt(90)
fd(15.5)
end_fill()
up()
rt(90)
fd(59.5)
down()
begin_fill()
fd(16)
lt(270)
fd(15.5)
lt(90)
fd(15.5)
rt(90)
fd(16)
rt(90)
fd(15.5)
lt(90)
fd(16)
rt(90)
fd(16)
rt(90)
fd(16)
lt(90)
fd(16)
rt(90)
fd(16)
rt(90)
fd(16)
lt(90)
fd(15.5)
end_fill()
hideturtle()
done()
No comments:
Post a Comment