Skip to content
Bhavye Mathur edited this page Jul 13, 2020 · 2 revisions

The Arc Class

Do you want to create an arc using Goopy? Well, here's how to do so:

from goopylib.objects.Arc import Arc # Import only the Arc class
from goopylib.imports import *  # Import Everything in Goopy

window = GraphWin("Test Window", width=800, height=800, autoflush=False)

example_arc = Arc(Point(400, 400), start_angle=0, end_angle=150, radius=700).draw(window)

while True:
    window.update_win()

You can specify any value for the start & end angles while creating the arc. Another value you can add to this is the radius2 argument. This optional argument will allow you to create elliptical Arcs:

example_arc = Arc(Point(400, 400), start_angle=45, end_angle=220, radius=700, radius2=500).draw(window)

Solid Arcs

Clone this wiki locally