MCPcopy Create free account
hub / github.com/Notgnoshi/generative / yaw

Method yaw

generative/lsystem/turtle.py:47–53  ·  view source on GitHub ↗

Yaw the turtle around its local Z axis.

(self, angle)

Source from the content-addressed store, hash-verified

45 logger.debug(f"stepping forward to {self.position}")
46
47 def yaw(self, angle):
48 """Yaw the turtle around its local Z axis."""
49 # NOTE: Capital axes indicate intrinsic Euler angles.
50 # Apparently, it's normal to indicate the normal and longitudinal axes with X and Z respectively
51 # I still want to keep the mental model of "Z is up, duh."
52 self.rotation = self.rotation * Rotation.from_euler("X", [angle], degrees=True)
53 logger.debug(f"yaw {angle}deg")
54
55 def pitch(self, angle):
56 """Pitch the turtle around its local Y axis."""

Callers 3

test_rollMethod · 0.95
test_yawMethod · 0.95
_interpret_defaultMethod · 0.80

Calls

no outgoing calls

Tested by 2

test_rollMethod · 0.76
test_yawMethod · 0.76