Sunday, November 27, 2022

Python Turtle Graphics Drawing - Spotify Logo

 Python Turtle Graphics Drawing - Spotify Logo

Youtube


Source code:

from turtle import *
M = [ # radius, pensize, x,y, start angle, angle
    [1.804, 0.0935, -0.15023, -1.42915, 64, 40],
    [1.3955, 0.0775, -0.16654, -1.34771, 62, 44],
    [1.2295, 0.0615, -0.1843, -1.48902, 61, 44],
]


def spotify(sz):
    up()
    seth(0)
    goto(0, 0)
    fd(sz)
    lt(90)
    begin_fill()
    circle(sz)
    end_fill()
    up()
    color('white')
    for m in M:
        goto(sz*m[2], sz*m[3])
        seth(m[4])
        fd(sz*m[0])
        lt(90)
        pensize(sz*m[1]*2)
        down()
        circle(sz*m[0], m[5])
        up()


setup(800, 800)
bgcolor('white')
color('#1AB26B')
spotify(100)


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 (...