I'm working on a project that involves generating and drawing a circular maze using Python's turtle graphics, and I've encountered a peculiar issue regarding symmetry. The maze is supposed to be symmetrically circular, with curved paths and arcs that extend from the center outwards. However, I've noticed that the top and left sides of the maze are symmetrical with each other, and so are the bottom and right sides, but there's a noticeable difference in symmetry between these two pairs. Essentially, the way the curves and arcs are drawn on the top/left differs from how they're drawn on the bottom/right.
The maze drawing involves calculating angles and radii for the arcs, and I've ensured that the turtle's orientation and the direction of drawing (left vs. right turns) are accounted for. Yet, something seems off. I've checked the initial heading settings, the application of angles for arcs, and the consistency in pen movements (forward, backward, pen up, and down) across different sections of the maze. Despite these checks, the asymmetry persists.
I'm wondering if there might be a subtlety in handling the turtle graphics coordinate system or in how the mathematical calculations for positioning and drawing arcs are applied differently across the maze's quadrants. If anyone has experience with turtle graphics or insights into common pitfalls that might lead to such asymmetry, your advice would be greatly appreciated. I'm particularly interested in tips on ensuring consistent drawing directions and angles, especially when working with circular patterns and arcs in a coordinate system centered on the screen.
Thank you in advance for your help!
To run:
Place both files in the same directory, and run circle.py in Python 3.12
Make sure you have ghostscripts installed on your PC. when installed, rename the executable in Program Files to gs.exe. it should be the .exe that's name has a C at the end (there are 2 .exe files)