forked from theutpal01/HacktoberFest2022
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSmiley.py
42 lines (35 loc) · 936 Bytes
/
Smiley.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import arcade # pip install arcade
# Setting size for main window
Window_width = 700
Window_height = 700
# Creating and opening the window
arcade.open_window(Window_width, Window_height, "Smiley")
arcade.set_background_color(arcade.color.BLACK)
arcade.start_render() # Always use this before starting
# Base Structure
x = 350
y = 350
radius = 200
arcade.draw_circle_filled(x, y, radius, arcade.color.YELLOW)
# Right Eye
x = 420
y = 420
radius = 25
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK)
# Left Eye
x = 280
y = 420
radius = 25
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK)
# Curve
x = 340
y = 310
width = 120
height = 100
start_angle = 180
end_angle = 360
arcade.draw_arc_outline(
x, y, width, height, arcade.color.BLACK, start_angle, end_angle, 10
)
arcade.finish_render() # Ends the arcade
arcade.run() # Keeps the window running until closed