Appendix A

List of primitives

The turtle is controlled by means of internal commands called ‘primitives’ . The following sections set out these primitives:



 A.1 Movement of the turtle; pen and color settings

  A.1.1 A word on colors

  A.1.2 Animation Mode

  A.1.3 Writing in the text area with the primitive print or write

 A.2 Turtle and 3D

  A.2.1 The perspective projection

  A.2.2 Understanding orientation in a 3D World

  A.2.3 Primitives available in 2D mode and 3D mode

  A.2.4 3D Viewer

  A.2.5 Drawing a cube

  A.2.6 Lighting the scene

  A.2.7 Fog effect

 A.3 Arithmetical and logical operations

 A.4 Operations on lists

 A.5 Booleans

 A.6 Testing an expression with the primitive if

 A.7 The workspace

  A.7.1 Procedures

  A.7.2 Concept of variables

  A.7.3 Property Lists

 A.8 Advanced fill function:

  A.8.1 fill and fillzone

  A.8.2 Primitive fillpolygon

 A.9 Break commands

 A.10 Multiturtle Mode

 A.11 Play music

  A.11.1 Playing music using MIDI synthetizer

  A.11.2 Playing MP3

 A.12 Loops:

  A.12.1 A loop with repeat

  A.12.2 A loop with for

  A.12.3 A loop with while

  A.12.4 A loop with foreach

  A.12.5 A loop with forever

  A.12.6 A loop with repetewhile

  A.12.7 A loop with repeatuntil

 A.13 Receiving input from the user

  A.13.1 Interact with the keyboard

  A.13.2 Some examples of usage:

  A.13.3 Interact with the mouse

  A.13.4 Some examples of usage:

  A.13.5 Graphical components

 A.14 Time and date

 A.15 Using a network with XLogo

  A.15.1 The network How to

  A.15.2 Primitives for networking