Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Thank you a lot.

You: ' [should turtle be capitalized as you've done previously?; however you show this, be consistent.] ' * In other publications/documents the figure is called 'turtle' without capitalization. So I think I'll use it that way. Or ?

 You: '[image: firkant]'
* I forgot to translate the <Alt> tags in the HTML code. ('firkant' = 'square'). I hope you see the image, not the alternative text.

Kolbjørn

Den 27.12.2015 01:46, anne-ology skreiv:
        now, continuing -
           see comments below throughout -

        This second section looks good as is;
           but does have a few grammatical errors which I'll point out in [
]s.


How to Move the Turtle

In addition to move the turtle with the menu buttons, you can also move it
in any direction, and any distance with written commands. In a move command
there must be a number which set the number of pixels the turtle shall be
moved. If the command will turn the turtle, the number will tell how many
degrees. (360 ​​° is a full circle). Write the command in the command line
and press Enter to execute the command.

    [change 'to move' to 'to moving';

       delete 'also', is superfluous with 'in addition';

          change 'which set' to 'which sets';

             change 'shall' to 'should';

                'to execute the command' to 'to execute that command']

You determine the direction in which the turtle will be moved with the
commands LEFT, RIGHT and DIRECTION.

LEFT 90 will turn the turtle 90° to the left (counter-clockwise). RIGHT 45
turns the turtle 45° to the right (clockwise) in relation to the angle the
turtle has before turning. DIRECTION can also take degrees but then in
relation to the screen. 0° is upwards, 270° is to the left, and so forth.

The home place for the turtle is the center of the screen with head upward.
If the first command is FORWARD 50 this will therefore move the turtle 50
pixels upwards, whereas BACK 70 will move it 70 pixels downwards. The head
is still facing upwards.

    [delete 'therefore'; is superfluous]

Now we have some of the most important commands for moving the turtle.
Write in the command line the code you find below. Press the Enter key
after each line. It is not necessary to write the comments after the
semicolon (;). A semicolon indicates that the following text is not a part
of the program, but an explanation to the programmer telling what the
command does.
[image: firkant]

    - FORWARD 100; Moves the turtle 100 pixels forwards.
    - RIGHT 90; Turns the turtle 90 degrees to the right.
    - FORWARD 100
    - RIGHT 100
    - FORWARD 100
    - RIGHT 100
    - FORWARD 100

LibreLogo has a very simple error function. If there are bugs, a window
pops up with a message telling that there is a mistake in the line number
x. Sometimes there isalso text that is meant to show what the error is, but
this text is mostly of little help.

    ['telling that there is a mistake' should be changed maybe to 'stating
...'; an inanimate object cannot tell; which is a form of speaking;

       also there should be a space between is & also]

If you have got everything right, there will now be a square with sides 100
pixels long on the screen.

    [delete got]

It is possible to enter several commands on the command line at the same
time. So instead of typing commands above separately, you can enter FORWARD
100 RIGHT 90 and press Enter three times. Erase RIGHT 90 so that only FORWARD
100 remain and press Enter again to complete the last line.

Naturally you should try to create other shapes with other parameters. What
about making a hexagon? You can start with a new screen by pressing the
buttons Clear screen and Home on the menu bar, or with the commands CLEAR
SCREEN and then HOME.

*Moving without rendering*

To move the turtle without drawing a line, use the command PENUP. To draw a
visible line again, use the command PENDOWN.

    [should turtle be capitalized as you've done previously?; however you
show this, be consistent.]
Measurement units

If you writes lengths and angles without a measurement unit, LibreLogo will
use the default units: pixel and degrees. (Pixels are the dots which
creates the image on the screen). You may also use some other units of
measurement. FORWARD 10cm will move the turtle 10 cm forward. Note that the
measurement unit must be typed in lower case without spaces between the
number and unit of measure. Other measurements are “mm” and “inch”. Instead
of degrees, you can use a clock face. Command RIGHT 4h will turn the turtle
pointing at 4 o'clock. These different unit can also be written as decimal
numbers. RIGHT 9.5h and FORWARD 2.75cm works fine.

    [change 'writes' to write;

       change 'creates' to 'create';

          change 'different unit' to 'different units']


Other controls for the Turtle

Above are the fundamental commands for moving the turtle, but there are
other ways of controlling it. Here are some of them.

    [decide how to show Turtle then suggestion: 'find & replace' throughout
document]

*Location on screen*

POSITION [x, y] places the turtle at coordinates (x, y) on the screen. As
usual (0,0) is the upper left corner of the screen. In addition to being
moved to the location, the turtle is rotated in the direction towards the
coordinates. If the pen is down, it also draws a line when moving. There is
no control telling you that the turtle is outside the screen. If you
write POSITION
[3000, 100] the turtle is placed far outside the screen. If you want you
can avoid this by defining two variants, for example :maxX and :maxY to get
the coordinates of the lower right corner of the page and use these in
other commands. An example: First get the coordinates by using :maxX =
PAGESIZE [0] and :maxY = PAGESIZE [1] and then use it to set the position
of the turtle POSITION [:maxX / 4, :maxY / 3 which will place the turtle ¼
from the left side of the page width, and ⅓ down. (The slash is the
division symbol in LibreLogo).

The commands RIGHT and LEFT rotates the turtle in relation to the direction
it had before the command was executed. The HEADING command turns the
turtle in relation to the screen, regardless of what direction it has from
before. Direction is (usually) set in degrees, where 0 is upwards. HEADING
180 will rotate the turtle facing downwards. You can also specify the
direction as coordinates: HEADING [200, 300] or in relation to the clock
face: HEADING 9h will turn the turtle towards 9 o'clock. (Note lower case h
without spaces).

    [change rotates to rotate;

       (in English making a word plural by adding 's' is not always correct;
sometimes just the opposite  ;-)  )]

*Move home*

Another move command is HOME which moves the turtle to the starting point
in the center of the screen. It will also be rotated to its start position,
with the head upward. The turtle does not draw when it moves back home.

*Hiding the turtle*

If the picture of the turtle disrupts a drawing you can hide the turtle by
typing the command HIDETURTLE. You easily get the turtle reappear with the
command SHOWTURTLE.

    [change 'You easily get the turtle reappear with the command' to 'To
easily have the Turtle re-appear', use command]

*Blank out the screen*

To start over again with a clean screen, use the command CLEARSCREEN. This
command removes all what is on the screen. The turtle will keep standing
where it is. To move the turtle to its starting position, use the command
HOME.

    [change 'removes all what is on the screen' to 'removes all on the
screen']
A little about writing

LibreLogo has, like any other language, some writing rules that are
important:
● There must be a space between the command and the value (number).
● You can enter several commands on the same line with spaces between
expressions.
● Commands can be upper case or lower case letters, or a mixture.
● Many commands have several names. Refer to the menu “Commands” for a
complete list. In this document I have written all commands in upper case
to clarify that they are commands.

    [change “Commands” to 'Commands']



<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
This
email has been sent from a virus-free computer protected by Avast.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>



--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.