The arcade library is a high-tech Python Package with advanced set of tools for making 2D games with gripping graphics and sound. It is Object-oriented and is especially built for Python 3.6 and above versions.
Arcade inbuilt functions to draw circle :-
1. arcade.draw_circle_outline( ) : This function is used to draw the outline of a circle. Â Â
Syntax: arcade.draw_circle_outline(center_x, center_y, radius, color, border_width, num_segments)
Parameters:
- center_x  – x position that is the center of the circle.
- center_y  – y position that is the center of the circle.
- radius  – width of the circle.
- color – color which with outline will be drawn.
- border_width – Width of the circle outline in pixels.
- num_segments – Higher is the number of segments, higher is the quality, but slower render time. The default value is -1 which means arcade will try to calculate a reasonable amount of segments based on the size of the circle.
Let’s take an example-
Python3
#import moduleimport arcadeÂ
# Open the window. Set the window title and# dimensions (width and height)arcade.open_window(600, 600, "Draw an arc for GfG ")Â
#set backgroundarcade.set_background_color(arcade.color.WHITE)Â
# Start the render process.arcade.start_render()Â
#function to draw a circlearcade.draw_circle_outline(300, 285, 88, arcade.color.GREEN, 9,-1)Â
#finish drawingarcade.finish_render()Â
#to display everythingarcade.run() |
Â
Â
Output:
Â
Â
Since, now you know how to draw a simple outline of a circle. Let’s draw the Olympic flag using this arcade.draw_circle_outline( ).
Â
Python3
#import moduleimport arcadeÂ
# Open the window. Set the window title and# dimensions (width and height)arcade.open_window(600, 600, "Draw an arc for GfG ")Â
# set background colorarcade.set_background_color(arcade.color.WHITE)Â
# Start the render process.arcade.start_render()Â
# function for designing olympic flagarcade.draw_circle_outline(100, 285, 88, arcade.color.BLUE, 9, -1)arcade.draw_circle_outline(300, 285, 88, arcade.color.BLACK, 9, -1)arcade.draw_circle_outline(500, 285, 88, arcade.color.RED, 9, -1)arcade.draw_circle_outline(200, 185, 88, arcade.color.YELLOW, 9, -1)arcade.draw_circle_outline(400, 185, 88, arcade.color.GREEN, 9, -1)Â
# finished drawingarcade.finish_render()Â
# to display everythingarcade.run() |
Output:
2. arcade.draw_circle_filled( ) : This function is used to draw color filled circle .Â
Syntax: arcade.draw_circle_outline(center_x, center_y, radius, color, num_segments)
Parameters:
- center_x  – x position that is the center of the circle.
- center_y  – y position that is the center of the circle.
- radius  – width of the circle.
- color – color which with outline will be drawn.
- num_segments – Higher is the number of segments, higher is the quality, but slower render time. The default value is -1 which means arcade will try to calculate a reasonable amount of segments based on the size of the circle.
Let’s take an example-
Python3
#import moduleimport arcadeÂ
# Open the window. Set the window title and dimensions (width and height)arcade.open_window(600, 600, "Draw a circle for GfG ")Â
# set backgroundarcade.set_background_color(arcade.color.WHITE)Â
# Start the render process.arcade.start_render()Â
# draw circlearcade.draw_circle_filled(300, 450, 78, arcade.color.PINK, 0)Â
Â
# finish drawingarcade.finish_render()Â
# to display everythingarcade.run() |
Output:
Since, now you know how to draw a simple outline of a circle. Let’s draw a snowman using this arcade.draw_circle_filled( ).
Python3
#import moduleimport arcadeÂ
# Open the window. Set the window title and # dimensions (width and height)arcade.open_window(600, 600, "Draw a circle for GfG ")Â
# set backgroundarcade.set_background_color(arcade.color.WHITE)Â
# Start the render process.arcade.start_render()Â
# snowman upper partarcade.draw_circle_filled(300, 450, 68, arcade.color.SKY_BLUE, 0)Â
# snowman eyesarcade.draw_circle_filled(289, 475, 8, arcade.color.BLACK, 0)arcade.draw_circle_filled(329, 475, 8, arcade.color.BLACK, 0)Â
# snowman lower partarcade.draw_circle_filled(300, 350, 88, arcade.color.BLUE, 0)arcade.draw_circle_filled(300, 250, 108, arcade.color.SKY_BLUE, 0)Â
# finish drawingarcade.finish_render()Â
# to display everythingarcade.run() |
Output:

