SETORIGIN takes two inputs, X and Y, and defines the new HOME position for all active turtles. You can also move the HOME coordinates of one or more turtles with the SETORIGIN command. The (SETWINSIZE) command used in parentheses without inputs restores the default extent of the Graphics Window to one turtle step per pixel. This created predictable relationships between your graphics and the Graphics Window but may result in your graphics being compressed or stretched depending on the ratio between the window size in pixels and turtle steps. For example, (SETEXTENT 100 200) defines a window that is 200 steps wide and 400 steps high.īy using the SETEXTENT command and scaling the Graphics Windows to turtle steps, you can be assured that your graphics fit within the Graphics Window no matter how it is resized. SETEXTENT can optionally take a second argument if you want to define different extents for the X and Y directions. You can, for example, establish that the border of the Graphics Window is 100 turtle steps from the HOME position no matter what the physical size or shape of the Graphics Window with the SETEXTENT 100 command. The SETEXTENT command takes one argument, the extent. Logo provides the SETEXTENT command to define the maximum distance from the HOME position of the turtle to the edge of the Graphics Window in terms of the turtle steps (the extent of the Graphcs Window). Sometimes it is useful to define the size of the Graphics Window in turtle steps regardless of its physical appearance in terms of pixels. Since by default a turtle step is equal to a pixel, SETWINSIZE also determines the size of the Graphics Window in terms of turtle steps. The SETWINSIZE command takes two inputs, the X and Y size of the drawing area as pixels. The HOME position is always in the middle of the Graphics Window regardless of its shape. If the window is enlarged with the mouse or the SETWINSIZE command, any wrapped lines reflect the previous border of the window but wrapping now occurs at the new window border. The turtle is in WRAP mode, meaning it appears at the opposite border when it crosses one of the boundaries of the Graphics Window. When Logo starts, each turtle step is equal to one screen pixel in any direction. Logo provides several ways to relate turtle steps to graphics pixels. Logo turtle movements are measured in turtle steps while computer monitors display graphics in pixels. You CAN'T edit because the page is protected page.ġ. PC Logo is an education language can help we calculate, sing, draw, write. PC Logo is a language you can write a program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |