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

Method roll

generative/lsystem/turtle.py:60–67  ·  view source on GitHub ↗

Roll the turtle around its local X axis. Just a roll is enough to affect direction, since it's a rotation around the longitudinal axis. That is, a rotation around the axis you're facing.

(self, angle)

Source from the content-addressed store, hash-verified

58 logger.debug(f"pitch {angle}deg")
59
60 def roll(self, angle):
61 """Roll the turtle around its local X axis.
62
63 Just a roll is enough to affect direction, since it's a rotation around the longitudinal
64 axis. That is, a rotation around the axis you're facing.
65 """
66 self.rotation = self.rotation * Rotation.from_euler("Z", [angle], degrees=True)
67 logger.debug(f"roll {angle}deg")

Callers 2

test_rollMethod · 0.95
_interpret_defaultMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_rollMethod · 0.76