Wednesday, November 9, 2022

Python Turtle Graphics Drawing - Ubuntu Logo

 Python Turtle Graphics Drawing - Ubuntu Logo

Youtube


Source code:

from turtle import *
setup(640,640)
bgcolor('black')
col = '#DD4814'
R = 280
r = 38.91*R/100
w = 19.25*R/100
r2 = 13.39*R/100
r3 = 5.02*R/100
h = 3.77*R/100
l = 68.62*R/100
color(col)
up()
fd(R)
lt(90)
down()
begin_fill()
circle(R)
end_fill()
up()
color('white')
lt(90)
fd(R-(r+w))
rt(90)
down()
begin_fill()
circle(r+w)
end_fill()
up()
lt(90)
color(col)
fd(w)
rt(90)
down()
begin_fill()
circle(r)
end_fill()
up()
lt(90)
fd(r)
rt(120)
down()
color('white')
for i in range(3):
    up()
    fd(l+r2+r3)
    lt(90)
    down()
    color(col)
    begin_fill()
    circle(r2+r3)
    end_fill()
    up()
    lt(90)
    fd(r3)
    rt(90)
    color('white')
    down()
    begin_fill()
    circle(r2)
    end_fill()
    up()
    color('white')
    lt(90)
    fd(l+r2)
    rt(90)
    down()
    color(col)
    begin_fill()
    fd(h)
    lt(90)
    fd(r+w)
    lt(90)
    fd(h*2)
    lt(90)
    fd(r+w)
    lt(90)
    fd(h)
    end_fill()
    up()
    lt(30)
done()

No comments:

Post a Comment

Python Turtle Graphics Drawing - Gigabyte

 Python Turtle Graphics Drawing - Gigabyte Youtube Source code: from turtle import * setup ( 600 , 600 ) color ( '#2D68AE' ) up (...