Friday, January 13, 2023

Python Turtle Graphics Drawing - Yamaha Logo

Python Turtle Graphics Drawing - Yamaha Logo

Youtube


Source code:

from turtle import *

BLU = '#4B1E78'
title('YAMAHA')
setup(550, 550)


def fork():
    lt(90)
    fd(95)
    down()
    rt(90)
    begin_fill()
    circle(-12, 90)
    fd(252)
    lt(90)
    fd(24)
    lt(90)
    fd(252)
    lt(6.6)
    circle(53.9, 45)
    rt(16)
    circle(-21.5, 71.1)
    rt(9.5)
    fd(5.7)
    rt(2.7)
    circle(7.4, 67.4)
    lt(0.4)
    fd(55.4)
    rt(8.8)
    circle(2.5, 90)
    rt(22.6)
    circle(2.5, 90)
    rt(8.8)
    fd(55.4)
    lt(0.4)
    circle(7.4, 67.4)
    rt(2.7)
    fd(5.7)
    rt(9.5)
    circle(-21.5, 71.1)
    rt(16)
    circle(53.9, 45)
    lt(6.6)
    fd(252)
    lt(90)
    fd(24)
    lt(90)
    fd(252)
    circle(-12, 90)
    end_fill()

up()
fd(261)
down()
color(BLU)
lt(90)
begin_fill()
circle(261)
end_fill()
color('white')
up()
lt(90)
fd(11)
down()
rt(90)
begin_fill()
circle(250)
end_fill()
color(BLU)
up()
lt(90)
fd(28)
down()
rt(90)
begin_fill()
circle(222)
end_fill()
color('white')
N = 3
for i in range(N):
    up()
    goto(0, 0)
    seth(i*360/N)
    fork()
hideturtle()
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 (...