There is only one necessary command to move the turtle. It is forward which has the mnemonic fd. When working with a robot (real) turtle as opposed to a graphics based (virtual) one, you might find that the turning commands left and right [lt & rt] move the turtle a little, accidentally.
When the turtle moves, it may draw a line as it goes depending on whether the pen is up or down at the time, and whether the current pen color is different from the background color.
A graphics based (virtual) turtle can also jump around the screen with setx, sety, and setxy
发布评论
评论(6)
查看此处找到的其他一些海龟命令...
海龟命令
BACK # # [BK]
- 将海龟向后移动BACKGROUND ## [BG]
- 设置背景颜色 (0-15)CLEARSCREEN [CS]
- 清除屏幕而不移动海龟DRAW
- 清除屏幕并带乌龟回家EACH
- 告诉几个精灵,它们的数字在一个列表中,接受第二个列表中的命令,例如EACH [1 2] [SQUARE 10]
FORWARD ## [FD]
- 向前移动海龟FULLSCREEN
- 全图形屏幕(与按 F5 相同)HEADING
- 将海龟标题输出为数字 (0-359)HIDETURTLE [HT]
- 制作海龟不可见HOME
- 将海龟移动到屏幕中心,指向上方LEFT [LT]
- 将海龟向左转动NODRAW [ND]
- 进入清晰的文本模式screenNOWRAP
- 防止绘图环绕屏幕PENCOLOR [PC]
- 更改笔颜色PENDOWN [PD]
- 海龟留下痕迹PENUP [PU]
- 海龟停止留下踪迹RIGHT ## [RT]
- 海龟右转SETHEADING [SETH]
- 设置海龟航向,例如SETH 180
SETSHAPE
- 设置当前精灵形状 (0-7)SETX
将海龟移动到指定的 x 坐标,例如SETX 50< /code>
SETXY
将海龟移动到指定的 x、y 坐标 例如。SETXY 50 50
SETY
将海龟移动到指定的 y 坐标,例如SETY 50
SHAPE
- 输出数字当前精灵形状的SHOWTURTLE [ST]
- 使海龟可见SPLITSCREEN
- 混合图形和文本屏幕(与按 F3 相同)STAMPCHAR
- 使海龟在当前位置标记一个字符,例如STAMPCHAR "A
TELL
- 告诉指定的精灵接收命令,例如TELL 2
TEXTSCREEN
- 使用整个屏幕显示文本(与按 F1 相同)TOWARDS
- 海龟的输出标题面向 X,Y 坐标,例如TOWARDS 0 0
WRAP
- 让海龟绘图环绕屏幕XCOR
- 输出海龟当前的 x 坐标YCOR
- 输出当前 y海龟的坐标ASPECT
- 设置垂直屏幕比例因子,默认为 0.76直接从网站获取的样本:http://gaza.freehosting.net/logo/index.html
Check out some other turtle commands found here...
Turtle Commands
BACK ## [BK]
- Move turtle backBACKGROUND ## [BG]
- Set Background color (0-15)CLEARSCREEN [CS]
- Clear Screen without moving turtleDRAW
- Clear Screen and take turtle homeEACH
- Tell several sprites, whose numbers are in a list, to accept commands in a second list, e.g.EACH [1 2] [SQUARE 10]
FORWARD ## [FD]
- Move turtle forwardFULLSCREEN
- Full graphics screen (same as pressing F5)HEADING
- Output turtle heading as a number (0-359)HIDETURTLE [HT]
- Make turtle invisibleHOME
- Move turtle to center of screen pointing upLEFT [LT]
- Turn turtle leftNODRAW [ND]
- Enter text mode with clear screenNOWRAP
- Prevent drawings from wrapping around screenPENCOLOR [PC]
- Change pen colorPENDOWN [PD]
- Turtle leaves trailPENUP [PU]
- Turtle ceases to leave trailRIGHT ## [RT]
- Turn turtle rightSETHEADING [SETH]
- Set turtle heading, e.g.SETH 180
SETSHAPE
- Set the current sprite shape (0-7)SETX
Move the turtle to the specified x co-ordinates e.g.SETX 50
SETXY
Move the turtle to the specified x, y co-ordinates Eg.SETXY 50 50
SETY
Move the turtle to the specified y co-ordinate, e.g.SETY 50
SHAPE
- Output number of current sprite's shapeSHOWTURTLE [ST]
- Make turtle visibleSPLITSCREEN
- Mixed graphics and text screen (same as pressing F3)STAMPCHAR
- Make the turtle stamp a character at the current location, e.g.STAMPCHAR "A
TELL
- Tell designated sprite to receive commands, e.g.TELL 2
TEXTSCREEN
- Use whole screen for text (same as pressing F1)TOWARDS
- Output heading for turtle to face an X,Y coordinate, e.g.TOWARDS 0 0
WRAP
- Make turtle drawings wrap around the screenXCOR
- Output current x co-ordinate of turtleYCOR
- Output current y co-ordinate of turtleASPECT
- Set verticle screen scale factor, default is 0.76Samples taken directly from website: http://gaza.freehosting.net/logo/index.html
徽标就是移动乌龟...你给它命令像这样:
你也可以做类似重复命令的事情:(
我能赢什么?8-)
Logo is all about moving the turtle... you give it commands like this:
You can do stuff like repeating commands too:
(What do I win? 8-)
哇! 它还在吗?
这曾经有效。
Whoa! Is it still around?
That used to work.
我见过一些 LOGO 实现,您可以在其中使用本地化命令,例如:
甚至 NAPRZÓD(带有波兰语字母 Ó)。
LOGO 是一种很好的语言,可以教孩子们用他们的母语进行编程。
I've seen a few LOGO implementations where you can use localized commands like:
or even NAPRZÓD (with Polish letter Ó).
LOGO is nice language to teach kids programming in their native spoken language.
通过以正确的语法发出命令。 EG:
移动乌龟只有一个必要的命令。 它是
forward
,具有助记符fd
。 当使用机器人(真实)乌龟而不是基于图形(虚拟)的乌龟时,您可能会发现转向命令左
和右
[lt< /代码> &
rt
] 不小心将乌龟移动了一点。大多数实现也允许命令
向后< /code> [
bk
]。当乌龟移动时,它可能会画一条线,具体取决于当时笔是向上还是向下,以及当前笔的颜色是否与背景颜色不同。
基于图形的(虚拟)海龟还可以使用
setx
、sety
和setxy
在屏幕上跳跃By issuing commands in the correct syntax. E.G.:
There is only one necessary command to move the turtle. It is
forward
which has the mnemonicfd
. When working with a robot (real) turtle as opposed to a graphics based (virtual) one, you might find that the turning commandsleft
andright
[lt
&rt
] move the turtle a little, accidentally.Most implementations also allow the command
backwards
[bk
].When the turtle moves, it may draw a line as it goes depending on whether the pen is up or down at the time, and whether the current pen color is different from the background color.
A graphics based (virtual) turtle can also jump around the screen with
setx
,sety
, andsetxy
尝试:
bk
(后退)、fd
(前进)、ld
(左转度数)、rt
(右转)。try:
bk
(back),fd
(forward),ld
(left turn in degrees),rt
(right turn).