PyDocs

Nav

Graphical user interfaces with Tk

setworldcoordinates

turtle

function
  • setworldcoordinates(llx, lly, urx, ury)
Set up a user-defined coordinate system. llx and lly are the x and y coordinates of the lower left corner of the canvas. urx and ury are the x and y coordinates of the upper right corner. Switch to mode “world” if necessary, which performs a reset. If mode “world” is already active, all drawings are redrawn according to the new coordinates. In user-defined coordinate systems, angles may appear distorted, see mode().
1 Example
>>> screen.reset()
>>> screen.setworldcoordinates(-50,-7.5,50,7.5)
>>> for _ in range(72):
...     left(10)
...
>>> for _ in range(8):
...     left(45); fd(2)   # a regular octagon
from the Python docs
See Also
No see-alsos for turtle/setworldcoordinates
0 Notes
No notes for setworldcoordinates