How can I make a semi-circle in Python's Zelle graphics package? This code makes me a circle.
balldistance=40;
ball1=Circle(Point(spacing*b+spacing-150,FieldHeight-GroundDepth),ball1);
ball1.setFill("red");
ball1.draw(Field);
How can I make a semi-circle in Python's Zelle graphics package? This code makes me a circle.
balldistance=40;
ball1=Circle(Point(spacing*b+spacing-150,FieldHeight-GroundDepth),ball1);
ball1.setFill("red");
ball1.draw(Field);
The Zelle graphics module doesn't provide code for drawing a semi-circle (arc) directly. However, since the module is written in Python, built on tkinter, and tkinter provides an arc drawing routine, we can add our own Arc subclass that inherits from the Zelle Oval class and implements arcs:
OUTPUT