Rotate the turtleshape to point in the specified direction Argument: angle -- number Rotate the turtleshape to point in the direction specified by angle, regardless of its current tilt-angle. DO NOT change the turtle's heading (direction of movement). Exam
(self, angle)
| 2740 | self.pen(resizemode="user", shearfactor=shear) |
| 2741 | |
| 2742 | def settiltangle(self, angle): |
| 2743 | """Rotate the turtleshape to point in the specified direction |
| 2744 | |
| 2745 | Argument: angle -- number |
| 2746 | |
| 2747 | Rotate the turtleshape to point in the direction specified by angle, |
| 2748 | regardless of its current tilt-angle. DO NOT change the turtle's |
| 2749 | heading (direction of movement). |
| 2750 | |
| 2751 | |
| 2752 | Examples (for a Turtle instance named turtle): |
| 2753 | >>> turtle.shape("circle") |
| 2754 | >>> turtle.shapesize(5,2) |
| 2755 | >>> turtle.settiltangle(45) |
| 2756 | >>> stamp() |
| 2757 | >>> turtle.fd(50) |
| 2758 | >>> turtle.settiltangle(-45) |
| 2759 | >>> stamp() |
| 2760 | >>> turtle.fd(50) |
| 2761 | """ |
| 2762 | tilt = -angle * self._degreesPerAU * self._angleOrient |
| 2763 | tilt = (tilt * math.pi / 180.0) % (2*math.pi) |
| 2764 | self.pen(resizemode="user", tilt=tilt) |
| 2765 | |
| 2766 | def tiltangle(self, angle=None): |
| 2767 | """Set or return the current tilt-angle. |