From a3c8a3f0553767fb7f5734734b5cd8b54adfa482 Mon Sep 17 00:00:00 2001 From: tgaeta Date: Thu, 18 Sep 2025 12:18:14 -0400 Subject: [PATCH] New feature: writing at an angle! After Dr. Proctor's comment in the chat I realized my code wouldn't work if you were trying to write at an angle so I added a rotation to the transform. Surprisingly easy fix. --- .DS_Store | Bin 6148 -> 6148 bytes typeface.py | 11 +++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.DS_Store b/.DS_Store index 025b1a5c30621007ac90e8bd92de25d43e7d749c..b0a0654a9760613746c377cffb2fbe58c27743e7 100644 GIT binary patch delta 135 zcmZoMXffEJ#uT?RgMop8g+Y%YogtHSjoO5eMBmhEvzRQVLV@&y@& u!O8i#1wcIv3``psCa+_Xnmmt*k4ZKR$W-H)AkKXlWG0X!v-t-Tk0=1`)*~ Point: "Recursive definition of a Bezier curve" assert(len(points) > 0) @@ -36,7 +42,8 @@ def draw_bezier(unit, segments, *points: tuple[float, ...]): "Draws bezier and returns turtle to initial position" segments = int(unit * (segments / 40)) origin = pos() - points = tuple(origin + unit * Point(x) for x in points) + angle = heading() + points = tuple(origin + rotate_2d_degrees(unit * Point(x), angle) for x in points) teleport(*points[0]) for i in range(0, segments + 1):