Référence › Movement and Pose — 110 commandes
anchor
Entrée: none
Sortie: list
Returns the location of the current anchor. The anchor is the 'pivot point' of the orbit commands and pullin / pullout.
show anchor
around
Entrée: position (list) | vector (list) | length (number) | radius (number)
Sortie: turtles (list)
Returns a list of turtles within the cylinder created by the given parameters, in the direction indicated by the vector away from the position with the given length and radius. Useful for collision detection. See also inside, encroaching.
snappy:show without turtle around position forwarddir 200 20
[myrtle]
autoorbit
Entrée: direction (word) | degrees (number) | time (60ths of a second)
Sortie: none
Automatically orbits the current view turtle in the specified direction the specified number of degrees every specified 60ths of a second. noautoorbit turns it off. Subsequent autoorbits cancel previous ones.
autoorbit "left 2 5
autoorbit "up 0.5 10
back
Aussi: bk
Entrée: turtlesteps (number)
Sortie: none
Recule la tortue courante du nombre de pas de tortue indiqué.
back 20
barriers
Entrée: none
Sortie: list
Lists the existing barriers. See setbarriers
show barriers
direction
Entrée: position (list)
Sortie: vectors (list)
Returns a list of vectors that would point the calling turtle at the supplied list of co-ordinates.
show direction myrtle:position snappy:position
[[0 1 0] [0 0 1] [1 0 0]]
snappy:setvectors direction myrtle:position
distance
Entrée: position (list) | position (list)
Sortie: distance (number)
Renvoie la distance entre le premier jeu de coordonnées et le second. distance accepte une liste [X Y Z] ou une liste [X Y], Z valant alors 0
show distance myrtle:position snappy:position
show distance [0 0 0] [100 100 100]
divergence
Entrée: [vector1 vector2] (list) | [vector3 vector4] (list)
Sortie: degrees (number)
Divergence returns the degrees of difference (divergence) between vector1 and vector3 in a clockwise direction, that direction established using vector2 and vector4, which need to be the axis you would be pivoting on to measure that difference. So if you're measuring the degrees of difference between two forward vectors in terms of left and right, the second vector needs to be the up vector. If you were measuring the difference in terms of up and down, you would give the right vector. Divergence is extremely useful for ball games.
show divergence {item 1 myrtle:vectors item 3 myrtle:vectors} {item 1 snappy:vectors item 3 myrtle:vectors}
90
down
Aussi: dn
Entrée: degrees (number)
Sortie: none
Abaisse le nez de la tortue appelante du nombre de degrés indiqué. Voir up
down 45
drift
Entrée: steps vector
Sortie: none
Causes the selected turtle to 'drift' the specified number of steps in the direction specified by vector. You can use drift to simulate momentum or gravity, particularly in concert with workers. See forwarddir
drift 10 forwarddir
forward 10 make "forward forwarddir newworker [repeat 5 [drift 1 :forward]]
dropanchor
Entrée: none
Sortie: none
Sets the selected turtle's orbit anchor point to its current position. See setanchor
repeat 10 [penup forward 60 dropanchor pullout 50 pendown repeat 36 [orbitleft 10]]
encroaching
Entrée: position (list) | vectors (list) | [left right forward backward above below] (list)
Sortie: turtles (list)
Returns a list of turtles encroaching within the 'box' specified by the third list input. This is a more sophisticated version of inside, which allows for a box of any orientation, based on the provided vectors. See around, inside
show encroaching position vectors [10 10 10 10 10]
extrapolate
Entrée: position (list) | vector (list) | distance (number)
Sortie: list
Returns a list of target co-ordinates based on the starting position, a vector and the distance in turtle-units along that vector.
show extrapolate position forwarddir 5
face
Entrée: position (list of 3) | position (list of 3)
Sortie: vector (list)
face takes two lists of co-ordinates (x, y and z) and then returns a list of vectors (list of three lists of three) which if applied to a turtle cause it to 'face' the second set of co-ordinates if positioned at the first set of co-ordinates.
setvectors face position [100 100 100]
facingp
Entrée: co-ordinates (list) | degrees (number)
Sortie: boolean
returns true if a vector from the calling turtle to the supplied co-ordinates diverges less than the supplied number of degrees from the calling turtle's forward vector. See divergence
reset
snappy:show facingp myrtle:position 10
true
myrtle:show facingp snappy:position 10
false
fence
Entrée: none
Sortie: none
Arrête la tortue appelante lorsqu'elle atteint les limites de l'écran définies par setbounds. Voir setbounds, bounds, window, wrap, hitboundsp
fence
fixate
Aussi: fix
Entrée: position
Sortie: none
Both sets the anchor point and points the selected turtle at it. Compare with setanchor, which does not change the orientation of the selected turtle.
snappy:fixate myrtle:position
fixate [0 0 0]
points Snappy (the camera turtle) at Myrtle.
forward
Aussi: fd
Entrée: turtle-spaces (number)
Sortie: none
Avance la tortue du nombre de pas de tortue indiqué. Trace une ligne si le crayon est baissé. Voir pendown, back
forward 20
forwarddir
Entrée: none
Sortie: vector (list)
Returns the calling turtle's forward vector. See backdir
show forwarddir
backdir
Entrée: none
Sortie: vector (list)
Returns the calling turtle's back vector. See forwarddir
show backdir
heading
Aussi: hd
Entrée: none
Sortie: degrees
Renvoie le cap (axe x) de la tortue sélectionnée, en degrés. Le cap est une valeur relative cumulée qui ne suffit pas, à elle seule, à reproduire fidèlement une orientation lorsque la tortue se déplace en trois dimensions : utilisez pour cela orientation / setorientation. Voir pitch et roll
print heading
home
Entrée: none
Sortie: none
Ramène la tortue actuellement sélectionnée à sa position d'origine.
home
inside
Entrée: [[x1 y1 z1] [x2 y2 z2]]
Sortie: list
Returns a list of turtles inside the area denoted by the provided sets of co-ordinates.
show inside [[-100 -100 -100] [100 100 100]
[myrtle]
jump
Entrée: steps (number)
Sortie: none
Avance la tortue du nombre de pas de tortue indiqué sans rien tracer, quel que soit l'état du crayon.
jump 20
left
Aussi: lt
Entrée: degrees
Sortie: none
Fait pivoter la tortue sélectionnée vers la gauche du nombre de degrés indiqué. Voir right
left 90
lt 45
leftarc
Aussi: larc
Entrée: degrees or [degrees segments] | radius
Sortie: none
Crée un arc vers l'avant et vers la gauche depuis la position de la tortue, en la plaçant à son extrémité. Les arcs ne franchissent pas proprement les bords en mode wrap. Si le premier paramètre est une liste, la première valeur donne les degrés et la seconde le nombre de segments de l'arc, ce qui remplace l'algorithme interne de calcul du nombre de segments. Voir rightarc
leftarc 90 40
location
Entrée: co-ordinates (list)
Sortie: list
Returns a list of isRight, isAbove, isAhead where a value of 1 indicates the target co-ordinates are in those areas relative to the turtle's forward view, 0 indicates that the co-ordinates are on the same plane as the calling turtle as appropriate, and -1 indicates the co-ordinates are in the opposite region (eg a -1 for isRight indicates it is to the left of the turtle's forward vector / view).
snappy:show location myrtle:position
[0 0 1]
myrtle:show location snappy:position
[0 1 0]
lower
Aussi: lo
Entrée: turtle-units
Sortie: none
Abaisse la tortue (la recule le long de son vecteur vertical). Équivaut à down 90 forward turtle-units up 90. Par exemple, Myrtle dans sa position d'origine au démarrage de turtleSpaces s'éloigne de la tortue caméra Snappy si vous l'abaissez. Voir raise
lower 100
move
Entrée: distance (turtle-units) | degrees OR [degrees degrees] OR [[vector]]
Sortie: none
Déplace la tortue dans la direction indiquée du nombre d'unités de tortue indiqué, sans modifier son orientation ni ses vecteurs. Si une liste de deux valeurs est fournie, le déplacement se fait d'abord latéralement (première valeur) puis verticalement (seconde valeur).
move 20 45
move 20 [45 45]
repeat 3600 [move repcount / 1000 repcount]
near
Entrée: position (list) | radius (number) OR [radius group] (list)
Sortie: list
Returns a list of all the turtles within the specified radius of turtle-units from the specified position. If a list is provided for the second parameter, only members of the specified group are returned. See nearme
show near [0 0 0] 10
nearme
Entrée: distance (number) OR [distance group] (list)
Sortie: turtles (list)
Returns a list of turtles within the specified distance of the calling turtle, except the calling turtle itself. If a list is provided, the first entry is distance, the second entry is the group – only members from this group are returned. See near, nearp
show nearme 200
show nearme [20 turtles]
noautoorbit
Entrée: none
Sortie: none
Turns off any existing autoorbit. See autoorbit.
noautoorbit
nostealth
Entrée: none
Sortie: none
Causes calling turtle to appear in lists generated by near. See stealth
nostealth
notether
Entrée: none
Sortie: none
Untethers the selected turtle from the orbit anchor point. When the turtle is untethered, the anchor point moves relative to it.
notether
orbitdistance
Entrée: none
Sortie: turtle-units (number)
Returns the distance between a turtle and its anchor point. See setanchor, dropanchor
show orbitdistance
orbitdown
Aussi: odn
Entrée: degrees (number)
Sortie: none
Fait orbiter la tortue par le dessous autour de son point d'ancrage, du nombre de degrés indiqué. Notez que la tortue rejoint directement sa destination si fluid est désactivé, et que si le crayon est baissé une ligne est tracée entre le départ et la destination, sans point intermédiaire. Voir setanchor, dropanchor
orbitdown 90
orbitleft
Aussi: olt
Entrée: degrees (number)
Sortie: none
Fait orbiter la tortue vers la gauche autour de son point d'ancrage, du nombre de degrés indiqué. Notez que la tortue rejoint directement sa destination si fluid est désactivé, et que si le crayon est baissé une ligne est tracée entre le départ et la destination, sans point intermédiaire. Voir setanchor, dropanchor
orbitleft 90
orbitright
Aussi: ort
Entrée: degrees (number)
Sortie: none
Fait orbiter la tortue vers la droite autour de son point d'ancrage, du nombre de degrés indiqué. Notez que la tortue rejoint directement sa destination si fluid est désactivé, et que si le crayon est baissé une ligne est tracée entre le départ et la destination, sans point intermédiaire. Voir setanchor, dropanchor
orbitup
Aussi: oup
Entrée: degrees (number)
Sortie: none
Fait orbiter la tortue par le dessus autour de son point d'ancrage, du nombre de degrés indiqué. Notez que la tortue rejoint directement sa destination si fluid est désactivé, et que si le crayon est baissé une ligne est tracée entre le départ et la destination, sans point intermédiaire. Voir setanchor, dropanchor
orbitup 90
orbitvector
Entrée: vector (list) | degrees (number)
Sortie: none
Orbits the specified number of degrees around the turtle's anchor point using the specified vector. To orbit in the opposite direction, specify a negative number of degrees. Note that the turtle goes to its destination directly regardless of the status of fluid, and if the pen is down a line will be drawn between the start and destination with no intermediary points. See setanchor, dropanchor
orbitvector updir 10
orientation
Entrée: none
Sortie: list
Returns the current orientation, in the order specified by orientationorder. So if orientation order is set to "phr, then the first value returned by orientation will be pitch, the second heading and the third roll. See orientationorder
show orientation
orientationorder
Entrée: none
Sortie: word
Returns the current order heading, pitch and roll are processed when setorientation, setheading, setpitch or setroll is used.
show orientationorder
"hpr
origin
Entrée: none
Sortie: list
Returns the current origin co-ordinates. See setorigin, home
show origin
[0 0 0]
originvectors
Entrée: none
Sortie: list
Returns the current origin vectors. See setoriginvectors, origin, home
show originvectors
pitch
Aussi: pt
Entrée: none
Sortie: pitch (number)
Renvoie le tangage (assiette) de la tortue courante
print pitch
pos
Entrée: none
Sortie: [x y] (list)
Renvoie les coordonnées x et y de la tortue. Pour les trois dimensions, voir position
show pos
position
Entrée: none
Sortie: [x y z] (list)
Renvoie les coordonnées de la tortue. Pour les deux premières dimensions seulement, voir pos
show position
project
Entrée: [x% y% (Z)] (list)
Sortie: list
Returns a list containing the associated X and Y coordinates of the given percentage values as returned by mousex and mousey, assuming the given Z plane (or 0 if not provided). You can use this to set the turtle position to the mouse pointer position. This currently only works if the camera is in its home position. See mousex, mousey
show project [50 20]
setpos project {mousex mousey}
pullin
Aussi: pui
Entrée: turtle-spaces (number)
Sortie: none
Rapproche la tortue appelante de son point d'ancrage du nombre d'espaces de tortue indiqué. S'arrête si elle atteint le point d'ancrage.
pullin 40
pullout
Aussi: puo
Entrée: turtle-spaces (number)
Sortie: none
Éloigne la tortue appelante de son point d'ancrage du nombre d'espaces de tortue indiqué.
dropanchor repeat 20 [penup pullout 10 pendown repeat 36 [orbitleft 10]]
raise
Aussi: ra
Entrée: turtle-units (number)
Sortie: none
Élève la tortue actuellement sélectionnée du nombre d'unités de tortue indiqué. Trace une ligne si le crayon est baissé. Voir lower
raise 20
randomheading
Aussi: randhead
Entrée: none
Sortie: none
Oriente la tortue dans une direction aléatoire.
randomheading
randomposition
Aussi: randpos
Entrée: none
Sortie: none
Place la tortue à une position aléatoire dans ses limites actuelles, sur le plan Z courant. Voir bounds
randomposition
randomvectors
Aussi: randvec
Entrée: none
Sortie: none
Orients the currently selected turtle randomly in three dimensions. This does NOT alter the current pitch, heading or roll values.
pendown repeat 10 [randomvectors fd 100 home]
relative
Entrée: [x y z] (list)
Sortie: [heading pitch] (list)
Returns the relative heading and pitch adjustments, as a list, required to turn the calling turtle from its current orientation to face the provided 3D co-ordinate. Unlike towards, relative considers the full [x y z] position and the turtle's current view direction, so it works at any orientation. Applying the result as right first relative [x y z] followed by up second relative [x y z] will point the turtle at the target. The smaller (possibly negative) angle is always returned. See towards, setheading.
right first relative [30 40 50] up second relative [30 40 50]
right
Aussi: rt
Entrée: degrees
Sortie: none
Fait pivoter la tortue sélectionnée vers la droite du nombre de degrés indiqué. Si le nombre de degrés est négatif, la rotation se fait vers la gauche. Voir left
right 90
rightarc
Aussi: rarc
Entrée: degrees or [degrees segments] | radius
Sortie: none
Crée un arc vers l'avant et vers la droite depuis la position de la tortue, en la plaçant à son extrémité. Les arcs ne franchissent pas fidèlement les bords en mode wrap. Si le premier paramètre est une liste, le second élément indique le nombre de segments à utiliser pour construire l'arc. Voir leftarc
rightarc 90 40
rightdir
Entrée: none
Sortie: vector
Returns the right vector of the selected turtle. See leftdir
show rightdir
leftdir
Entrée: none
Sortie: vector
Returns the left vector of the selected turtle. See rightdir
show leftdir
roll
Aussi: ro
Entrée: none
Sortie: number
Renvoie la valeur de roulis actuelle. Voir setroll
show roll
rollleft
Aussi: rl
Entrée: degrees (number)
Sortie: none
Fait rouler la tortue actuellement sélectionnée vers la gauche du nombre de degrés fourni.
rollleft 90
rollright
Aussi: rr
Entrée: degrees (number)
Sortie: none
Fait rouler la tortue actuellement sélectionnée vers la droite du nombre de degrés fourni.
rollright 45
setanchor
Entrée: position (list) [X Y (Z)]
Sortie: none
Sets the selected turtle's orbit anchor to the specified two or three-dimensional position. Compare with fixate.
setanchor [50 20] ;no Z (implied 0)
setanchor [0 0 10] ;with Z
setbarriers
Entrée: [[[x1 y1 z1][x2 y2 z2]][[x3 y3 z3][x4 y4 z4]]…] (list of lists)
Sortie: none
Sets barriers on the calling turtle. The calling turtle cannot venture into the defined area(s). See barriers
setbarriers [[[0 0 0][100 100 100]]]
setbounds
Aussi: sbds
Entrée: x1 y1 x2 y2 (list) OR [[x1 y1 z1][x2 y2 z2]] (list of lists) OR radius
Sortie: none
Définit les limites utilisées par wrap et fence. Si une seule valeur est fournie, la limite est le rayon d'un cercle ou d'une sphère centré sur l'origine courante. Si cette valeur unique est négative, la limite est un hémisphère posé sur Z : la tortue ne peut pas aller vers les Z négatifs. Si aucune valeur Z n'est fournie, elles valent -1000 / 1000. Les limites par défaut sont [[-212 -119 100] [212 119 100]], au format [[x1 y1 z1] [x2 y2 z2]], ce qui donne une zone d'affichage de 424 unités de tortue de large, 238 de haut et 200 de profondeur. Voir bounds, fence, wrap
setbounds [-100 -100 100 100]
setbounds [[-100 -100 -100][100 100 100]
setheading
Aussi: seth shd
Entrée: degrees (number)
Sortie: none
Règle le cap de la tortue (gauche-droite) et met à jour son orientation en conséquence. Attention : setheading modifie bien la valeur du cap pour les besoins de l'orientation, mais si setheading est employé isolément, setorientation risque de ne pas rétablir l'orientation attendue. Si vous comptez rétablir l'orientation d'une tortue avec setorientation, utilisez aussi setorientation pour en modifier les différents aspects. Voir orientation
setheading 90
setorbitdistance
Entrée: turtle-units (number)
Sortie: none
Sets the currently selected turtle's distance from its anchor point.
setorbitdistance 100
setorientation
Entrée: vectors (list)
Sortie: none
First unwinds the current orientation in the reverse of orientationorder, then changes the calling turtle's orientation in the order specified by orientationorder, so that if orientationorder is "PHR then the first orientation changed is pitch, then heading, then the roll. Due to the nature of 3D movements, setorientation can only be used to restore orientations that are the result of relatively simple transforms (that is, series of orientation changing commands such as rollright or down). To restore complex orientations, use both setorientation and setvectors. See setvectors
setorientation [0 90 0]
setorientationorder
Entrée: order (word)
Sortie: none
Sets the order in which heading, pitch and roll are processed after using setheading, setpitch or setroll. The required word is a three letter combination made up of h, for heading, p, for pitch, and r, for roll. See orientationorder
setorientationorder "hpr
setorientationorder "rhp
setorigin
Entrée: [x y z] (list)
Sortie: none
Sets the turtle's origin, the location it goes when it goes home. See origin, home
setorigin [50 50 50]
setoriginvectors
Entrée: vectors (list)
Sortie: none
Sets the turtle’s origin vectors, the orientation the turtle ends up in when it goes home. See originvectors, vectors, home
setoriginvectors vectors
setpitch
Aussi: setp spi
Entrée: degrees (number)
Sortie: none
Sets the turtle's pitch (up-down) and updates its orientation appropriately. Be aware that while setpitch will alter the value of pitch for the purposes of orientation, setorientation may not restore the expected turtle orientation if setpitch is used in isolation. If you intend to use setorientation to restore a turtle's orientation, you should use setorientation to change aspects of a turtle's orientation also. See orientation
setpitch 180
setposition
Aussi: setpos spo
Entrée: [x y (z)] (list) OR [[x1 y1 z1] [x2 y2 z2]…]
Sortie: none
Définit les coordonnées de la tortue. Si le crayon est baissé, une ligne est tracée entre l'ancienne et la nouvelle position. Si une liste de listes est fournie à setposition, des lignes relient ces points (si le crayon est baissé) et la tortue reste à la dernière position donnée.
setpos [20 30]
setposition [10 20 30]
pendown repeat 100 [setposition {-200 + random 400 -200 + random 400 -200 + random 400}]
setroll
Aussi: setr sro
Entrée: degrees (number)
Sortie: none
Sets the turtle's roll (rollleft-rollright) and updates its orientation appropriately. Be aware that while setroll will alter the value of roll for the purposes of orientation, setorientation may not restore the expected turtle orientation if setroll is used in isolation. If you intend to use setorientation to restore a turtle's orientation, you should use setorientation to change aspects of a turtle's orientation also. See orientation
setroll 90
setvectors
Entrée: [[forwarddir] [updir] [rightdir]] (list of lists)
Sortie: none
Définit l'orientation de la tortue courante à l'aide de vecteurs.
setvectors [1 -1 0] [1 1 1] [0 0 0]
setx
Entrée: number
Sortie: none
Définit la position x de la tortue.
setx 100
setxy
Entrée: x (number) | y (number)
Sortie: none
Sets the turtle's x and y co-ordinates. This is here for compatibility. As opposed to setpos, which takes the two co-ordinates as a list. See setpos
setxy 10 20
sety
Entrée: number
Sortie: none
Définit la position y de la tortue.
sety 20
setz
Entrée: number
Sortie: none
Définit la position z de la tortue.
setz 50
showme
Entrée: turtle
Sortie: none
Causes the calling turtle to position itself in the default view turtle position over the specified turtle. Usually called by the current view (camera) turtle.
showme "myrtle
slideleft
Aussi: sl
Entrée: turtle-steps
Sortie: none
Fait glisser la tortue vers la gauche du nombre de pas de tortue indiqué.
slideleft 20
slideright
Aussi: sr
Entrée: turtle-steps
Sortie: none
Fait glisser la tortue vers la droite du nombre de pas de tortue indiqué.
slideright 30
spin
Entrée: [vectors] (list) | degrees
Sortie: none
Fait tourner la tortue autour du vecteur donné du nombre de degrés donné, dans le sens des aiguilles d'une montre vu de derrière le vecteur, de sorte que SPIN FORWARDDIR 90 équivaut à ROLLRIGHT 90. N'affecte ni le tangage, ni le cap, ni le roulis.
spin forwarddir 90
stealth
Entrée: none
Sortie: none
Causes the calling turtle not to appear in lists returned by near. See nostealth
stealth
tether
Entrée: none
Sortie: none
Tethers the selected turtle to the orbit anchor point. If the turtle moves, the anchor point remains unchanged. See setanchor, notether
tether
topedge
Entrée: none
Sortie: number
Returns the top y co-ordinate for the bounds used by wrap and fence. See bottomedge, leftedge, rightedge, loweredge, upperedge
show topedge
bottomedge
Entrée: none
Sortie: number
Returns the bottom y co-ordinate for the bounds used by wrap and fence. See topedge, leftedge, rightedge, loweredge, upperedge
show bottomedge
leftedge
Entrée: none
Sortie: number
Returns the left x co-ordinate for the bounds used by wrap and fence. See topedge, bottomedge, rightedge, loweredge, upperedge
show leftedge
rightedge
Entrée: none
Sortie: number
Returns the right x co-ordinate for the bounds used by wrap and fence. See topedge, bottomedge, leftedge, loweredge, upperedge
show rightedge
loweredge
Entrée: none
Sortie: number
Returns the lower z co-ordinate for the bounds used by wrap and fence. See topedge, bottomedge, leftedge, rightedge, upperedge
show loweredge
upperedge
Entrée: none
Sortie: number
Returns the upper z co-ordinate for the bounds used by wrap and fence. See topedge, bottomedge, leftedge, rightedge, loweredge
show upperedge
towards
Entrée: [x y] (list)
Sortie: heading (number)
Renvoie le cap qui ferait regarder la tortue vers les coordonnées fournies. towards suppose que la coordonnée visée se trouve sur le même plan Z que la tortue. towards est une primitive héritée d'Apple Logo, utile dans turtleSpaces pour la compatibilité et les usages en deux dimensions. Voir heading
setheading towards [30 40]
up
Entrée: degrees
Sortie: none
Relève le nez de la tortue du nombre de degrés indiqué. Vue de dessus (la vue par défaut), up 90 fait pointer la tortue droit vers vous.
up 90
updir
Entrée: none
Sortie: vector (list)
Returns the calling turtle's current up vector. See downdir, rightdir, forwarddir
show updir
downdir
Entrée: none
Sortie: vector (list)
Returns the calling turtle's current down vector. See updir, rightdir, forwarddir
show downdir
unproject
Entrée: position (list)
Sortie: [x-percent y-percent (list)
Returns the 2D position of the object as a percentage of the window / screen. For example, if the turtle appears to be in the dead center of the screen, unproject will return 50% across and 50% down. Note: If the co-ordinate is not in the view of the camera, unproject will return spurious results!
unproject myrtle:position
vectors
Entrée: none
Sortie: [forwarddir updir rightdir]
Renvoie les vecteurs d'orientation de la tortue sous forme de liste. C'est la méthode la plus fiable pour enregistrer et rétablir l'orientation d'une tortue, contrairement à la fonction orientation qui renvoie des valeurs relatives de cap, tangage et roulis.
print vectors
xpos
Aussi: xcor
Entrée: none
Sortie: xpos (number)
Renvoie la coordonnée x actuelle de la tortue.
show xpos
ypos
Aussi: ycor
Entrée: none
Sortie: ypos (number)
Renvoie la coordonnée y actuelle de la tortue.
show ypos
zpos
Aussi: zcor
Entrée: none
Sortie: zpos (number)
Renvoie la coordonnée z actuelle de la tortue.
show zpos
zeroheading
Entrée: none
Sortie: none
Remet à zéro la valeur de cap de la tortue. Cela ne modifie pas son orientation réelle ; les changements ultérieurs feront évoluer le cap normalement. Cette primitive permet d'établir un nouveau cap de référence à partir duquel travailler. Voir heading
zeroheading
zeroorientation
Entrée: none
Sortie: none
Zeroes the turtle's orientation values (pitch, heading, roll). This does not modify the turtle's actual orientation. Further changes will modify orientation values as appropriate. This primitive allows you to establish new base orientation values to work forward from. See orientation
zeroorientation
zeropitch
Entrée: none
Sortie: none
Zeroes the turtle's pitch value. This does not modify the turtle's orientation. Further changes will modify pitch as appropriate. This primitive allows you to establish a new base pitch value to work forward from. See pitch
zeropitch
zeroroll
Entrée: none
Sortie: none
Zeroes the turtle's roll value. This does not modify the turtle's orientation. Further changes will modify roll as appropriate. This primitive allows you to establish a new base roll value to work forward from. See roll
zeroroll
zoom
Entrée: none
Sortie: number
Returns the turtle's 'zoom' value, which is relevant to its display when it is a view turtle. 100 (as in 100%) is the default value. See setzoom
show zoom
xcor
Entrée: none
Sortie: number
Forme abrégée de xpos. Renvoie la coordonnée X de la tortue.
print xcor
ycor
Entrée: none
Sortie: number
Forme abrégée de ypos. Renvoie la coordonnée Y de la tortue.
print ycor
zcor
Entrée: none
Sortie: number
Forme abrégée de zpos. Renvoie la coordonnée Z de la tortue.
print zcor
polar
Entrée: none
Sortie: list
Returns the turtle's current position in spherical polar coordinates as a list [azimuth elevation radius]. Azimuth is the horizontal angle around the Z-axis in degrees, elevation is the vertical angle from the XY plane in degrees, and radius is the distance from the origin.
setpolar [0 0 100]
show polar
[0 0 100]
setpolar [90 0 100]
show polar
[90 0 100]
setpolar [0 90 100]
show polar
[0 90 100]
setpolar
Entrée: [azimuth elevation (radius)]
Sortie: none
Sets the turtle's position using spherical polar coordinates. Azimuth is the horizontal angle in degrees, elevation is the vertical angle in degrees, and radius is the distance from origin. If radius is omitted, the turtle maintains its current distance from the origin while moving to the specified angles.
setpolar [0 0 100]
show polar
[0 0 100]
setpolar [90 0 100]
show polar
[90 0 100]
setpolar [180 45]
; keeps current radius, changes angles only