![]() “a_string”) or a list of words in brackets without quotation (e.g. The label command takes a single word as a quoted string (e.g. Logo has a number of other additional drawing commands, some of these are given below. setpensize means it can make the pen larger, easier to see.showturtle or st means show the turtle, so you can continue your drawing.hideturtle or ht means hide the turtle, so you can admire your drawing.pendown or pd means pick pen down, so you can move the turtle and leave tracks.Penup or pu means pick pen up, so you can move turtle without leaving tracks. The setpensize command decides the drawing pen size. It may leave ink behind, when the turtle returns to the center of the screen. The home command causes the turtle to return to the center of the screen. The hideturtle and showturtle commands hide or show the turtle, but do not affect its ability to leave ink as it moves. The pendown and penup commands tell the turtle to leave ink on the screen as it moves or not to leave ink, respectively. Logo has a number of other drawing commands, some of which are given below. For some Logo commands, separators are needed.įollowing are few practice commands with the desired results on the right.įollowing is an exercise to check your aptitude on what you have learned so far in this chapter. Thus, Logo can give an unambiguous meaning to each of these character strings. Since the command fd requires one argument, it is taken as the next value. These commands are read from the left to the right. The commands – fd 50 rt 120 fd 50 rt 120 fd 50 rt 120, cause the turtle to draw a triangle, as you can see by trying them out. However, if you type a command, which requires one or more inputs and provide the missing input(s) on the next line, Logo will show an error.įollowing is a practice command, which shows the desired results on the right. Several of these commands can be typed in succession in a command window followed by a carriage return. Commands will be issued one per line followed by a carriage return. You can set a variable to a number between 0 and 360 and then walk on that path. The turtle can be directed with headings that correspond to a compass rose, with 0 or 360 degrees pointing straight up, 90 degrees straight to the right, and so on. In its centered, zoom-"normal" state, Logo's drawing screen shows an area of about 150 points up or down and 300 points right or left from the center. Here, ‘0 0’ is the center, or origin (no comma or parentheses here!). Many programming systems work on the same kind of two-axis ‘xy’ coordinate plane, which we work with in Algebra as well. The right side wraps to the left side and the top wraps to the bottom. If the turtle tries to walk off onto one side of the screen, it wraps around. At the southwest corner, they are -250, -250 etc. ![]() At the northeast corner, they are 250, 250 at the southeast corner, they are 250, -250. The values of the two coordinates (normally called x and y) at the center are 0, 0. The graphics window has a coordinate system. Left 90 or lt 90 means left turn 90 degreesĬlearscreen or cs means erase all drawings. Right 90 or rt 90 means right turn 90 degrees A rotation by 360 is a complete rotation, therefore a rotation by 375 degrees is the same as 1/15 degrees.įorward 60 or fd 60 means go forward 60 steps The arguments for fd and bk are units those of rt and lt are angles that can be any integer. Except the cs command, each of these commands must be followed by one value called as its argument. ![]() ![]() The commands and their abbreviations are given below −Įither version of these commands can be used. The simple Logo Drawing Commands move the Turtle forward and backward and also turn it right or left. ![]() Once this is done, press Enter or click the Execute Button. Click a line in the history to make it jump to the respective command line, then we can make changes (if required). The command history will appear in the gray box. We can also write and run more than one command online at a time. To execute or run these commands, press Enter or click the Execute Button. We will write commands in the command line, i.e., the text box at the bottom of the Commander Window.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |