Draw a triangle using Arcade in Python Last Updated : 19 Oct, 2020 Comments Improve Suggest changes Like Article Like Report Arcade is a Python library that is used for developing 2Dimensional Games. Arcade needs support for OpenGL 3.3+. In the arcade, basic drawing does not require knowledge on how to define functions or classes or how to do loops, simply we have inbuilt functions for drawing primitives. Arcade inbuilt function for drawing triangle: 1: arcade.draw_traingle_outline( ): This function is used to draw an outline of a triangle. Syntax: arcade.draw_triangle_outline(x1 , y1, x2 , y2 , x3 , y3 , color, border_width) Parameters: x1: x value of first coordinate.y1: y value of first coordinate.x2:x value of second coordinate.y2: y value of second coordinate.x3: x value of third coordinate.y3: y value of third coordinate.color: Outline color of the triangle.border_width: Width of the border in pixels. Defaults to 1. Let's see an example to understand its functioning better. Python3 #import module import arcade # Open the window. Set the window title and # dimensions (width and height) arcade.open_window(600, 600, "Draw a triangle for GfG ") # set background color arcade.set_background_color(arcade.color.BLACK) # Start the render process. arcade.start_render() # triangle function arcade.draw_triangle_outline(300, 200, 80, 80, 100, 300, arcade.color.YELLOW, 1) # finished drawing arcade.finish_render() # display everything arcade.run() Output: 2: arcade.draw_triangle_filled( ): This function is used to draw a triangle filled with color. Syntax: arcade.draw_triangle_filled(x1, y1, x2, y2 , x3 , y3, color) Parameters: x1: x value of first coordinate.y1: y value of first coordinate.x2: x value of second coordinate.y2: y value of second coordinate.x3: x value of third coordinate.y3: y value of third coordinate.color: color to be filled in triangle. Example: Python3 # import import arcade # Open the window. Set the window title and # dimensions (width and height) arcade.open_window(600, 600, "Draw a triangle for GfG ") # set background color arcade.set_background_color(arcade.color.BLACK) # Start the render process. arcade.start_render() # draw triangle arcade.draw_triangle_filled(300, 200, 80, 80, 100, 300, arcade.color.YELLOW) # finish drawing arcade.finish_render() # display everything arcade.run() Output: Comment More infoAdvertise with us Next Article Draw a triangle using Arcade in Python P pulkitagarwal03pulkit Follow Improve Article Tags : Python Python-Arcade Practice Tags : python Similar Reads Draw a tree using arcade library in Python Drawing a tree isn't a tough task in Python using the turtle module. But, what if you can draw it using Arcade Module as well. Arcade is an object-oriented library. It can be installed like any other Python Package using an import arcade. Approach: Import arcade.Define a function to draw trees. Here 3 min read Draw an arc using Arcade in Python The arcade library is a high-tech Python Package with an advanced set of tools for making 2D games with gripping graphics and sound. It is Object-oriented and is specially built for Python 3.6 and above versions. Arcade has two inbuilt functions for drawing arc: 1: arcade.draw_arc_outline ( ): This 2 min read Draw a sun using arcade library Python You might have drawn Sun using famous Python module like turtle but here we discuss how the same approach can be achieved using arcade module. The Arcade library is a modern Python Module used widely for developing 2D video games with compelling graphics and sound. Arcade is an object-oriented libra 2 min read Draw a circle using Arcade in Python3 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 functi 3 min read Draw a parabola using Arcade in Python3 Arcade is a Python library which is used for developing 2Dimensional Games. Arcade needs support for OpenGL 3.3+. In arcade, basic drawing does not require knowledge on how to define functions or classes or how to do loops, simply we have inbuilt functions for drawing primitives. Arcade inbuilt func 3 min read Like