I have been trying to draw a simple circle using the arcade python library, but all I can see is a perfectly positioned triangle instead.
Here's the sample code I used:
import arcade
# Set constants for the screen size
SCREEN_WIDTH = 400
SCREEN_HEIGHT = 400
SCREEN_TITLE = "Happy Face Example"
# Open the window. Set the window title and dimensions
arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
# Set the background color
arcade.set_background_color(arcade.color.WHITE)
arcade.start_render()
# Draw the face
x = SCREEN_WIDTH // 2
y = SCREEN_HEIGHT // 2
radius = 100
arcade.draw_circle_filled(x, y, radius, arcade.color.YELLOW)
arcade.finish_render()
# Keep the window open until the user hits the 'close' button
arcade.run()
After several hours of searching the internet for a solution, I tried it on another PC, and I got a proper circle !!
My machine spec:
i) AMD Ryzen 5 2500U , Vega 8 graphics
ii) 8 GB RAM
iii) OS: Ubuntu 21.10
iv) Python version: 3.10
The machine on which it worked also runs Ubuntu 21.10, with an AMD CPU + GTX 1060 6 GB video card and has Python 3.10 installed.
What could be the problem?