Spis poleceń › Movement and Pose — poleceń: 110
anchor
Wejście: none
Wyjście: list
Returns the location of the current anchor. The anchor is the 'pivot point' of the orbit commands and pullin / pullout.
show anchor
around
Wejście: position (list) | vector (list) | length (number) | radius (number)
Wyjście: 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
Wejście: direction (word) | degrees (number) | time (60ths of a second)
Wyjście: 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
Także: bk
Wejście: turtlesteps (number)
Wyjście: none
Cofa bieżącego żółwia o podaną liczbę kroków żółwia.
back 20
barriers
Wejście: none
Wyjście: list
Lists the existing barriers. See setbarriers
show barriers
direction
Wejście: position (list)
Wyjście: 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
Wejście: position (list) | position (list)
Wyjście: distance (number)
Zwraca odległość od pierwszego zestawu współrzędnych do drugiego. distance przyjmuje listę [X Y Z] albo listę [X Y], przyjmując Z równe 0
show distance myrtle:position snappy:position
show distance [0 0 0] [100 100 100]
divergence
Wejście: [vector1 vector2] (list) | [vector3 vector4] (list)
Wyjście: 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
Także: dn
Wejście: degrees (number)
Wyjście: none
Opuszcza nos wywołującego żółwia o podaną liczbę stopni. Zobacz up
down 45
drift
Wejście: steps vector
Wyjście: 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
Wejście: none
Wyjście: 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
Wejście: position (list) | vectors (list) | [left right forward backward above below] (list)
Wyjście: 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
Wejście: position (list) | vector (list) | distance (number)
Wyjście: 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
Wejście: position (list of 3) | position (list of 3)
Wyjście: 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
Wejście: co-ordinates (list) | degrees (number)
Wyjście: 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
Wejście: none
Wyjście: none
Zatrzymuje wywołującego żółwia, gdy dotrze do granic ekranu ustawionych przez setbounds. Zobacz setbounds, bounds, window, wrap, hitboundsp
fence
fixate
Także: fix
Wejście: position
Wyjście: 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
Także: fd
Wejście: turtle-spaces (number)
Wyjście: none
Przesuwa żółwia do przodu o podaną liczbę kroków żółwia. Rysuje linię, jeśli pisak jest opuszczony. Zobacz pendown, back
forward 20
forwarddir
Wejście: none
Wyjście: vector (list)
Returns the calling turtle's forward vector. See backdir
show forwarddir
backdir
Wejście: none
Wyjście: vector (list)
Returns the calling turtle's back vector. See forwarddir
show backdir
heading
Także: hd
Wejście: none
Wyjście: degrees
Zwraca kurs (oś x) wybranego żółwia w stopniach. Kurs jest skumulowaną wartością względną, która sama w sobie nie pozwala wiernie odtworzyć orientacji, gdy żółw porusza się w trzech wymiarach; do tego służą orientation / setorientation. Zobacz pitch i roll
print heading
home
Wejście: none
Wyjście: none
Sprowadza aktualnie wybranego żółwia do pozycji domowej.
home
inside
Wejście: [[x1 y1 z1] [x2 y2 z2]]
Wyjście: 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
Wejście: steps (number)
Wyjście: none
Przesuwa żółwia do przodu o podaną liczbę kroków żółwia bez rysowania, niezależnie od stanu pisaka.
jump 20
left
Także: lt
Wejście: degrees
Wyjście: none
Obraca wybranego żółwia w lewo o podaną liczbę stopni. Zobacz right
left 90
lt 45
leftarc
Także: larc
Wejście: degrees or [degrees segments] | radius
Wyjście: none
Tworzy łuk do przodu i w lewo od pozycji żółwia, umieszczając go na jego końcu. W trybie wrap łuki nie przechodzą przez krawędzie w sposób czysty. Jeśli pierwszy parametr podano jako listę, pierwsza wartość to stopnie, a druga to liczba segmentów łuku, która zastępuje wewnętrzny algorytm obliczania liczby segmentów. Zobacz rightarc
leftarc 90 40
location
Wejście: co-ordinates (list)
Wyjście: 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
Także: lo
Wejście: turtle-units
Wyjście: none
Obniża żółwia (cofa go wzdłuż jego wektora w górę). To samo co down 90 forward turtle-units up 90. Na przykład Myrtle w pozycji domowej po uruchomieniu turtleSpaces oddali się od żółwia kamery Snappy, jeśli ją obniżysz. Zobacz raise
lower 100
move
Wejście: distance (turtle-units) | degrees OR [degrees degrees] OR [[vector]]
Wyjście: none
Przesuwa żółwia w podanym kierunku o podaną liczbę jednostek żółwia, nie zmieniając jego orientacji ani wektorów. Jeśli podano listę dwóch wartości, przesuwa go najpierw w poziomie (pierwsza wartość), a potem w pionie (druga wartość).
move 20 45
move 20 [45 45]
repeat 3600 [move repcount / 1000 repcount]
near
Wejście: position (list) | radius (number) OR [radius group] (list)
Wyjście: 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
Wejście: distance (number) OR [distance group] (list)
Wyjście: 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
Wejście: none
Wyjście: none
Turns off any existing autoorbit. See autoorbit.
noautoorbit
nostealth
Wejście: none
Wyjście: none
Causes calling turtle to appear in lists generated by near. See stealth
nostealth
notether
Wejście: none
Wyjście: none
Untethers the selected turtle from the orbit anchor point. When the turtle is untethered, the anchor point moves relative to it.
notether
orbitdistance
Wejście: none
Wyjście: turtle-units (number)
Returns the distance between a turtle and its anchor point. See setanchor, dropanchor
show orbitdistance
orbitdown
Także: odn
Wejście: degrees (number)
Wyjście: none
Obraca żółwia po orbicie od dołu wokół jego punktu zaczepienia o podaną liczbę stopni. Uwaga: przy wyłączonym fluid żółw przechodzi wprost do celu, a jeśli pisak jest opuszczony, między początkiem a celem rysowana jest linia bez punktów pośrednich. Zobacz setanchor, dropanchor
orbitdown 90
orbitleft
Także: olt
Wejście: degrees (number)
Wyjście: none
Obraca żółwia w lewo po orbicie wokół jego punktu zaczepienia o podaną liczbę stopni. Uwaga: przy wyłączonym fluid żółw przechodzi wprost do celu, a jeśli pisak jest opuszczony, między początkiem a celem rysowana jest linia bez punktów pośrednich. Zobacz setanchor, dropanchor
orbitleft 90
orbitright
Także: ort
Wejście: degrees (number)
Wyjście: none
Obraca żółwia w prawo po orbicie wokół jego punktu zaczepienia o podaną liczbę stopni. Uwaga: przy wyłączonym fluid żółw przechodzi wprost do celu, a jeśli pisak jest opuszczony, między początkiem a celem rysowana jest linia bez punktów pośrednich. Zobacz setanchor, dropanchor
orbitup
Także: oup
Wejście: degrees (number)
Wyjście: none
Obraca żółwia po orbicie od góry wokół jego punktu zaczepienia o podaną liczbę stopni. Uwaga: przy wyłączonym fluid żółw przechodzi wprost do celu, a jeśli pisak jest opuszczony, między początkiem a celem rysowana jest linia bez punktów pośrednich. Zobacz setanchor, dropanchor
orbitup 90
orbitvector
Wejście: vector (list) | degrees (number)
Wyjście: 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
Wejście: none
Wyjście: 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
Wejście: none
Wyjście: word
Returns the current order heading, pitch and roll are processed when setorientation, setheading, setpitch or setroll is used.
show orientationorder
"hpr
origin
Wejście: none
Wyjście: list
Returns the current origin co-ordinates. See setorigin, home
show origin
[0 0 0]
originvectors
Wejście: none
Wyjście: list
Returns the current origin vectors. See setoriginvectors, origin, home
show originvectors
pitch
Także: pt
Wejście: none
Wyjście: pitch (number)
Zwraca pochylenie bieżącego żółwia
print pitch
pos
Wejście: none
Wyjście: [x y] (list)
Zwraca współrzędne x i y żółwia. Aby otrzymać wszystkie trzy wymiary, zobacz position
show pos
position
Wejście: none
Wyjście: [x y z] (list)
Zwraca współrzędne żółwia. Aby otrzymać tylko dwa pierwsze wymiary, zobacz pos
show position
project
Wejście: [x% y% (Z)] (list)
Wyjście: 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
Także: pui
Wejście: turtle-spaces (number)
Wyjście: none
Przyciąga wywołującego żółwia ku jego punktowi zaczepienia o podaną liczbę przestrzeni żółwia. Zatrzymuje się po dotarciu do punktu zaczepienia.
pullin 40
pullout
Także: puo
Wejście: turtle-spaces (number)
Wyjście: none
Odsuwa wywołującego żółwia od jego punktu zaczepienia o podaną liczbę przestrzeni żółwia.
dropanchor repeat 20 [penup pullout 10 pendown repeat 36 [orbitleft 10]]
raise
Także: ra
Wejście: turtle-units (number)
Wyjście: none
Podnosi aktualnie wybranego żółwia o podaną liczbę jednostek żółwia. Rysuje linię, jeśli pisak jest opuszczony. Zobacz lower
raise 20
randomheading
Także: randhead
Wejście: none
Wyjście: none
Ustawia żółwia w losowym kierunku.
randomheading
randomposition
Także: randpos
Wejście: none
Wyjście: none
Umieszcza żółwia w losowym miejscu w obrębie bieżących granic, na bieżącej płaszczyźnie Z. Zobacz bounds
randomposition
randomvectors
Także: randvec
Wejście: none
Wyjście: 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
Wejście: [x y z] (list)
Wyjście: [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
Także: rt
Wejście: degrees
Wyjście: none
Obraca wybranego żółwia w prawo o podaną liczbę stopni. Jeśli liczba stopni jest ujemna, obraca go w lewo. Zobacz left
right 90
rightarc
Także: rarc
Wejście: degrees or [degrees segments] | radius
Wyjście: none
Tworzy łuk do przodu i w prawo od pozycji żółwia, umieszczając go na jego końcu. W trybie wrap łuki nie przechodzą przez krawędzie dokładnie. Jeśli pierwszy parametr podano jako listę, drugi element listy określa liczbę segmentów użytych do zbudowania łuku. Zobacz leftarc
rightarc 90 40
rightdir
Wejście: none
Wyjście: vector
Returns the right vector of the selected turtle. See leftdir
show rightdir
leftdir
Wejście: none
Wyjście: vector
Returns the left vector of the selected turtle. See rightdir
show leftdir
roll
Także: ro
Wejście: none
Wyjście: number
Zwraca bieżącą wartość przechylenia. Zobacz setroll
show roll
rollleft
Także: rl
Wejście: degrees (number)
Wyjście: none
Przechyla aktualnie wybranego żółwia w lewo o podaną liczbę stopni.
rollleft 90
rollright
Także: rr
Wejście: degrees (number)
Wyjście: none
Przechyla aktualnie wybranego żółwia w prawo o podaną liczbę stopni.
rollright 45
setanchor
Wejście: position (list) [X Y (Z)]
Wyjście: 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
Wejście: [[[x1 y1 z1][x2 y2 z2]][[x3 y3 z3][x4 y4 z4]]…] (list of lists)
Wyjście: 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
Także: sbds
Wejście: x1 y1 x2 y2 (list) OR [[x1 y1 z1][x2 y2 z2]] (list of lists) OR radius
Wyjście: none
Ustawia granice używane przez wrap i fence. Jeśli podano jedną wartość, granicą jest promień okręgu lub kuli o środku w bieżącym punkcie origin. Jeśli ta jedna wartość jest ujemna, granicą jest półkula oparta na Z, czyli żółw nie może wejść w ujemne wartości Z. Jeśli nie podano wartości Z, przyjmują one -1000 / 1000. Domyślne granice to [[-212 -119 100] [212 119 100]] w formacie [[x1 y1 z1] [x2 y2 z2]], co daje domyślny obszar wyświetlania o szerokości 424, wysokości 238 i głębokości 200 jednostek żółwia. Zobacz bounds, fence, wrap
setbounds [-100 -100 100 100]
setbounds [[-100 -100 -100][100 100 100]
setheading
Także: seth shd
Wejście: degrees (number)
Wyjście: none
Ustawia kurs żółwia (lewo-prawo) i odpowiednio aktualizuje jego orientację. Uwaga: setheading zmienia wprawdzie wartość kursu na potrzeby orientacji, ale użyte samodzielnie może sprawić, że setorientation nie przywróci oczekiwanej orientacji. Jeśli zamierzasz przywracać orientację żółwia za pomocą setorientation, używaj setorientation także do zmiany poszczególnych jej elementów. Zobacz orientation
setheading 90
setorbitdistance
Wejście: turtle-units (number)
Wyjście: none
Sets the currently selected turtle's distance from its anchor point.
setorbitdistance 100
setorientation
Wejście: vectors (list)
Wyjście: 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
Wejście: order (word)
Wyjście: 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
Wejście: [x y z] (list)
Wyjście: none
Sets the turtle's origin, the location it goes when it goes home. See origin, home
setorigin [50 50 50]
setoriginvectors
Wejście: vectors (list)
Wyjście: 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
Także: setp spi
Wejście: degrees (number)
Wyjście: 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
Także: setpos spo
Wejście: [x y (z)] (list) OR [[x1 y1 z1] [x2 y2 z2]…]
Wyjście: none
Ustawia współrzędne żółwia. Jeśli pisak jest opuszczony, między starą a nową pozycją rysowana jest linia. Jeśli setposition otrzyma listę list, rysuje linie łączące te punkty (przy opuszczonym pisaku), a żółw pozostaje w ostatniej podanej pozycji.
setpos [20 30]
setposition [10 20 30]
pendown repeat 100 [setposition {-200 + random 400 -200 + random 400 -200 + random 400}]
setroll
Także: setr sro
Wejście: degrees (number)
Wyjście: 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
Wejście: [[forwarddir] [updir] [rightdir]] (list of lists)
Wyjście: none
Ustawia orientację bieżącego żółwia za pomocą wektorów.
setvectors [1 -1 0] [1 1 1] [0 0 0]
setx
Wejście: number
Wyjście: none
Ustawia pozycję x żółwia.
setx 100
setxy
Wejście: x (number) | y (number)
Wyjście: 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
Wejście: number
Wyjście: none
Ustawia pozycję y żółwia.
sety 20
setz
Wejście: number
Wyjście: none
Ustawia pozycję z żółwia.
setz 50
showme
Wejście: turtle
Wyjście: 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
Także: sl
Wejście: turtle-steps
Wyjście: none
Przesuwa żółwia w bok, w lewo, o podaną liczbę kroków żółwia.
slideleft 20
slideright
Także: sr
Wejście: turtle-steps
Wyjście: none
Przesuwa żółwia w bok, w prawo, o podaną liczbę kroków żółwia.
slideright 30
spin
Wejście: [vectors] (list) | degrees
Wyjście: none
Obraca żółwia wokół podanego wektora o podaną liczbę stopni, zgodnie z ruchem wskazówek zegara patrząc zza wektora, tak że SPIN FORWARDDIR 90 działa tak samo jak ROLLRIGHT 90. Nie wpływa na pochylenie, kurs ani przechylenie.
spin forwarddir 90
stealth
Wejście: none
Wyjście: none
Causes the calling turtle not to appear in lists returned by near. See nostealth
stealth
tether
Wejście: none
Wyjście: none
Tethers the selected turtle to the orbit anchor point. If the turtle moves, the anchor point remains unchanged. See setanchor, notether
tether
topedge
Wejście: none
Wyjście: number
Returns the top y co-ordinate for the bounds used by wrap and fence. See bottomedge, leftedge, rightedge, loweredge, upperedge
show topedge
bottomedge
Wejście: none
Wyjście: number
Returns the bottom y co-ordinate for the bounds used by wrap and fence. See topedge, leftedge, rightedge, loweredge, upperedge
show bottomedge
leftedge
Wejście: none
Wyjście: number
Returns the left x co-ordinate for the bounds used by wrap and fence. See topedge, bottomedge, rightedge, loweredge, upperedge
show leftedge
rightedge
Wejście: none
Wyjście: number
Returns the right x co-ordinate for the bounds used by wrap and fence. See topedge, bottomedge, leftedge, loweredge, upperedge
show rightedge
loweredge
Wejście: none
Wyjście: number
Returns the lower z co-ordinate for the bounds used by wrap and fence. See topedge, bottomedge, leftedge, rightedge, upperedge
show loweredge
upperedge
Wejście: none
Wyjście: number
Returns the upper z co-ordinate for the bounds used by wrap and fence. See topedge, bottomedge, leftedge, rightedge, loweredge
show upperedge
towards
Wejście: [x y] (list)
Wyjście: heading (number)
Zwraca kurs, przy którym żółw byłby skierowany ku podanym współrzędnym. towards zakłada, że współrzędna docelowa leży na tej samej płaszczyźnie Z co żółw. towards to prymityw odziedziczony po Apple Logo, przydatny w turtleSpaces dla zgodności i w zastosowaniach dwuwymiarowych. Zobacz heading
setheading towards [30 40]
up
Wejście: degrees
Wyjście: none
Unosi nos żółwia o podaną liczbę stopni. Patrząc na żółwia z góry (widok domyślny), up 90 sprawia, że żółw skieruje się prosto ku tobie.
up 90
updir
Wejście: none
Wyjście: vector (list)
Returns the calling turtle's current up vector. See downdir, rightdir, forwarddir
show updir
downdir
Wejście: none
Wyjście: vector (list)
Returns the calling turtle's current down vector. See updir, rightdir, forwarddir
show downdir
unproject
Wejście: position (list)
Wyjście: [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
Wejście: none
Wyjście: [forwarddir updir rightdir]
Zwraca wektory orientacji żółwia w postaci listy. To najpewniejszy sposób zapisywania i przywracania orientacji żółwia, w odróżnieniu od funkcji orientation, która zwraca względne wartości kursu, pochylenia i przechylenia.
print vectors
xpos
Także: xcor
Wejście: none
Wyjście: xpos (number)
Zwraca bieżącą współrzędną x żółwia.
show xpos
ypos
Także: ycor
Wejście: none
Wyjście: ypos (number)
Zwraca bieżącą współrzędną y żółwia.
show ypos
zpos
Także: zcor
Wejście: none
Wyjście: zpos (number)
Zwraca bieżącą współrzędną z żółwia.
show zpos
zeroheading
Wejście: none
Wyjście: none
Zeruje wartość kursu żółwia. Nie zmienia to jego rzeczywistej orientacji; kolejne zmiany będą normalnie aktualizować kurs. Ten prymityw pozwala wyznaczyć nowy kurs odniesienia, od którego można pracować dalej. Zobacz heading
zeroheading
zeroorientation
Wejście: none
Wyjście: 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
Wejście: none
Wyjście: 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
Wejście: none
Wyjście: 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
Wejście: none
Wyjście: 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
Wejście: none
Wyjście: number
Skrócona forma xpos. Zwraca współrzędną X żółwia.
print xcor
ycor
Wejście: none
Wyjście: number
Skrócona forma ypos. Zwraca współrzędną Y żółwia.
print ycor
zcor
Wejście: none
Wyjście: number
Skrócona forma zpos. Zwraca współrzędną Z żółwia.
print zcor
polar
Wejście: none
Wyjście: 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
Wejście: [azimuth elevation (radius)]
Wyjście: 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