Saturday, February 17, 2024

Python Turtle Graphics Drawing - GOJEK

 Python Turtle Graphics Drawing - GOJEK

Youtube



Source code:

import math
from turtle import *
SCALE=3.5
setup(560,560)
shape('turtle')
color('#00AA13')
up()
fd(22.5*SCALE)
lt(90)
down()
begin_fill()
circle(22.5*SCALE)
end_fill()
up()
lt(90)
fd(22.5*SCALE)
lt(100)
R = 48.75
y = 11.25
x = math.sqrt(R*R-y*y)
ang = math.degrees(math.atan2(y,x))
ang2 = 180-(ang+90)
angt = (180-ang)/2
ang3 = angt-ang2
fd(x*SCALE)
lt(90)
fd(y*SCALE)
lt(ang3*2)
down()
pensize(22.5*SCALE)
circle(R*SCALE,340-ang*2)
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 (...