Skip to content

online turtle graphics example code defects #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ricknun opened this issue Oct 22, 2024 · 3 comments · Fixed by #43
Closed

online turtle graphics example code defects #40

ricknun opened this issue Oct 22, 2024 · 3 comments · Fixed by #43

Comments

@ricknun
Copy link

ricknun commented Oct 22, 2024

There are several problems in the CircuitPython version 9 example code at "Turtle Graphics in CircuitPython on TFT Gizmo" by John Park: https://learn.adafruit.com/turtle-graphics-gizmo/turtle-graphics-on-gizmo

I am using a Circuit Playground Bluefruit + TFT Gizmo + "Adafruit CircuitPython 9.1.4 on 2024-09-17" + the CircuitPython v9 code.py and \lib files from the example bundles. See the attached photos of Project Bundles "Star" (mis-rotated 90 degrees counter-clockwise), "Hilbert Curve" (incorrect origin), "Koch Snowflake" (incorrect origin), and "Christmas Tree" (tree mis-rotated 90 degrees, ornaments correct). Here are Cygwin diffs to show the changes I made to the 4 code.py files to make the images agree with those shown online.

diff _pre_mods_with_defects/turtle_christmas_tree.py turtle_christmas_tree.py
24a25
> turtle.right(90)

diff _pre_mods_with_defects/turtle_hilbert.py turtle_hilbert.py
54c54
< turtle.goto(-108, -108)
---
> turtle.goto(108, -108)

diff _pre_mods_with_defects/turtle_koch.py turtle_koch.py
34c34
< turtle.goto(-99, 56)
---
> turtle.goto(-56, -99)

diff _pre_mods_with_defects/turtle_star_fancy.py turtle_star_fancy.py
19a20
> turtle.right(90)

20241021_180320_resize
20241021_180752_resize
20241021_180823_resize
20241021_180855_resize

@ricknun
Copy link
Author

ricknun commented Nov 7, 2024

All 4 problems are fixed by adding turtle.mode("standard") to the example code. It appears the default turtle mode was changed from "standard" to "logo" since these example files were posted. Instead of changing all the example code I suggest changing the default mode back to "standard".

@ricknun
Copy link
Author

ricknun commented Nov 7, 2024

I also suggest as positively as possible, to do more regression testing before major releases. (:-)

@ricknun
Copy link
Author

ricknun commented Nov 12, 2024

Notice "John Park" is the author of the link mentioned in the original post:
https://learn.adafruit.com/turtle-graphics-gizmo/turtle-graphics-on-gizmo
He might be able to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant