shapes and graphics
- amigaball ab
- amigaballoid abo
- appendtrack
- arc
- backgroundshade
- begintag
- billboard
- box
- cappedcutsphere
- cappedcutspheroid
- cappeddome
- cappeddomoid
- cappedsphereslice
- cappedspheroidslice
- circle cir
- clean
- cleanspace
- clearallfrozen
- clearallterrain
- clearfrozen
- clearimage
- clearimages
- clearmodel
- clearmodels
- clearplot
- clearscreen cs
- clearterrain
- clonetag
- color
- colors
- cone cn
- coneslice csl
- conoid cno
- conoidslice cosl
- copytag
- copytrack
- csall
- cube cb
- cuboid cbo
- cutcone cc
- cutconeslice ccs
- cutconoid cco
- cutconoidslice ccos
- cutfunnel cf
- cutfunneloid cfo
- cutfunneloidslice cfos
- cutfunnelslice cfs
- cutsphere csp
- cutsphereslice css
- cutspheroid cso
- cutspheroidslice csos
- cylinder cy
- cylinderarc cya
- cylinderarcslice cyas
- cylinderslice cys
- cylindroid cyo
- cylindroidarc cyoa
- cylindroidarcslice cyoas
- cylindroidslice cyos
- definecolor dfw
- definecolors
- deleteoverlay
- deleteplot
- deletesticker
- dodecahedron dod
- dodecahedroid dodo
- dome dm
- domoid dmo
- doppel
- dot
- dots
- dotsize
- duocutconoid dcc
- duocutfunneloid dcfo
- duocylindroid dco
- duotuboid dto
- elevation
- ellipse ell
- endmark
- endrope
- endtag
- erasefrozen
- erasetag
- fill
- fillcolor
- fillopacity
- fiso
- frag
- freeze
- frozen
- funnel fu
- funnelslice fus
- funneloid fuo
- funneloidslice fuos
- gradient
- hidefrozen
- hideoverlay
- hideplot
- hidesticker
- hidetag
- hideterrain
- hidetrack
- icosphere ico
- icospheroid icd
- images
- inscribe
- iso
- lat
- lightlines
- line
- lines
- listcolors
- listfrozen
- listimages
- listmodels
- listoverlays
- listplots
- loadtag
- loadtrack
- mark
- merge
- modelscale
- newmodel
- newoverlay
- newplot
- newsticker
- nextframe
- nolines
- nolightlines
- norender
- nospeckle
- notrack
- notrackrender
- notwosided ntws
- octahedron oct
- octahedroid octo
- oval
- overlays
- peak
- pen
- pencolor pc
- pendown pd
- penopacity
- penshade psh
- pensides
- penup pu
- pie
- pin
- pinfrag
- pinshard
- placeoverlay
- placeplot
- placesticker
- plot
- plotcol
- plotline
- plots
- plottotrack
- poly
- polyellipse
- polyoval
- polyspot ps
- prism pri
- pyramid py
- pyramoid pyo
- quad qd
- ramp
- randomfillcolor randfc rfc
- randomfillshade randfs rfs
- randompencolor randpc rpc
- randompenshade randps rps
- rat
- rect
- replacetag
- resetmodel
- resize
- rhombus
- ring
- ringarc
- ringoid
- ringoidarc
- sample
- saveimage
- savemodel
- savetag
- savetrack
- selectplot
- setdotsize
- setelevation
- setfillcolor setfc sfc
- setfillshade setfs sfs
- setfillopacity setfo
- seticosphereiterations sisi
- setlinesnormal
- setmarkerwidth smw
- setoverlayresolution
- setoverlaytransparency
- setoverlayupdate
- setpencolor setpc spc
- setpenshade setps sps
- setpenopacity setpo
- setpensides
- setpenwidth spw setpw
- setspecklecolors
- setspeckleplot
- setspecklesize
- setspecklestyle
- setspheroidaxis ssa
- setterrain
- setterraincolors
- setterraininterior
- setterrainresolution
- settypedelay stde
- settypedepth std
- settypefont stf
- settypefilled stfi
- settypesize sts
- settypestretch str
- setview sv
- setviewfar
- setviewfov
- setviewnear
- setviewpoint
- setviewvectors
- setzoom
- shard
- showfrozen
- showoverlay
- showplot
- showsticker
- showtag
- showterrain
- showtrack
- skewfiso skf
- skewiso ski
- skewpyramid skp
- skewpyramoid skpo
- skewquad skq
- skewrect skr
- skewtraperect sktr
- skewtrapevoxeloid skvo
- skewtrapezoid skt
- skewvoxeloid skv
- snapshot
- speckle
- specklecolors
- speckleplot
- specklesize
- specklestyle
- sphere sph
- sphereslice sphs
- spheroid spd
- spheroidaxis
- spheroidslice spds
- spot sp
- square sq
- stamp
- startmark
- startrope
- stickers
- switchtag
- synctrackrender
- tag
- tags
- tent
- terrain
- terraincolors
- terraininterior
- terrainresolution
- tetrahedron th
- tetrahedroid tho
- thaw
- toroid tro
- toroidslice tros
- torusslice trs
- torus tr
- track
- trackcount
- trackitem
- tracklist
- trackrender
- traperect tre
- trapevoxeloid tvo
- trapezoid tz
- triangle tri
- tube tb
- tubearc tba
- tuboidarc tboa
- tubearcslice tbas
- tubeslice tbs
- tuboid tbo
- tuboidarc tboa
- tuboidarcslice tboas
- tuboidslice tbos
- twosided tws
- typeset
- typedepth
- typefont
- typesize
- typestretch
- unplot
- viewfar
- viewfov
- viewnear
- viewvectors
- voxel vx
- voxeloid vxo
- wedge
amigaball ab
Takes: radius (number) | stacks (number) | sectors (number)
Returns: none
Creates an ‘Amiga ball’, a sphere that alternates sectors between the pen color and the fill color.
amigaball 50 10 20
amigaballoid abo
Takes: radius (number) | stacks (number) | sectors (number) | ratio (number)
Returns: Creates a stretched or flattened Amiga ball, based on the supplied ratio. Respects setspheroidaxis
amigaballoid 50 10 20 0.5
appendtrack
Takes: “turtlea (word) | “turtleb (word)
Returns: none
Appends “turtlea’s track (its movements and graphics) to the end of “turtleb’s track. See copytrack
appendtrack "myrtle "bob
arc
Takes: degrees | radius
Returns: none
Creates an arc. The arc is created around the turtle, and the turtle does not move. For arcs the turtle moves along, see leftarc, rightarc
arc 90 20
backgroundshade
Takes: none
Returns: shade (number)
Returns the current background shade value. See setbackgroundshade
show backgroundshade
begintag
Takes: name (word)
Returns: none
Begins a ‘tag’, that is a grouping of movements, turtle parameter changes and shapes present in the calling turtle’s ‘track’, or output. The tag is closed with endtag. If there is an open tag when begintag is called, it closes the previous tag. These tagged groups can be used for creating turtle models using newmodel, can be hidden or shown using hidetag or showtag, or copied using copytag
begintag "newtag
billboard
Takes: name (word) | dimensions (list)
Returns: none
Creates a ‘billboard’ using the specified image and the specified list of dimensions [x y]. See sample
billboard "marquee [100 200]
box
Takes: size (number)
Returns: none
Creates a lined square of the specified size. If the parameter is supplied as a single-item list, the box is centered on the turtle. See rect
box 20
box [20]
cappedcutsphere
Takes: radius (number) | stacks (number) | sectors (number) | minstack (number) | maxstack (number)
Returns: none
Creates a truncated, or cut, sphere with caps on the cut ends. Can be cut on the top, bottom, or both based on specified minstack and maxstack values. See cappedcutspheroid
cappedcutsphere 30 14 32 4 13
cappedcutspheroid
Takes: radius (number) | stacks (number) | sectors (number) | minstack (number) | maxstack (number) | ratio
Returns: none
Creates a truncated, or cut, spheroid with caps on the cut ends stretched by the specified ratio. Can be cut on the top, bottom, or both based on specified minstack and maxstack values. See cappedcutspheroid, setspheroidaxis
cappedcutspheroid 30 14 32 4 13 2
cappeddome
Takes: radius (number) | stacks (number) | sectors (number)
Returns: none
Creates a ‘capped’ dome, a dome with a circle ‘sealing’ its bottom. See dome, cappeddomoid
cappeddome 30 20 20
cappeddomoid
Takes: radius (number) | stacks (number) | sectors (number) | ratio
Returns: none
Creates a capped dome stretched by the given ratio. See cappeddome, setspheroidaxis
cappeddomoid 30 20 20 0.5
cappedsphereslice
Takes: radius (number) | stacks (number) | sectorstotal (number) | sectorsused (number)
Returns: none
Creates a partial sphere of the overall specified radius, using the specified number of vertical ‘stacks’, and specified number of horizontal ‘sectors’, based on the given total number of sectors, and the used (displayed) number of sectors. Like an orange cut vertically. See cutsphere, cutsphereslice
sphereslice 20 10 10 5
cappedspheroidslice
Takes: radius (number) | stacks (number) | sectorstotal (number) | startsector (number) | endsector (number) | multiplier (number)
Returns: none
Creates a partial spheroid of the overall specified radius, using the specified number of vertical ‘stacks’, and specified number of horizontal ‘sectors’, based on the given total number of sectors, and the startsector and endsector values, and stretched using the provided multiplier. Like a squashed orange cut vertically. See cutspheroid, cutspheroidslice
spheroidslice 20 10 10 5 10 2
circle cir
Takes: radius
Returns: none
Creates a lined circle at the specified radius around the turtle
circle 50
repeat 18 [circle 50 rr 10]
clean
Takes: none
Returns: none
Erases the ‘turtle track’ (graphics) belonging to the current turtle without changing its position or state. Useful when a turtle is not actually drawing graphics but is itself a graphic element (for example, in a game) to ensure that its movements don’t build up in its track and slow down execution. To use clean in this context, simply place it at the end of the turtle’s “run loop”.
clean
cleanspace
Takes: none
Returns: none
Cleans all turtles in the current space. See clean
cleanspace
clearallfrozen
Takes: none
Returns: none
Erases all of the non-system turtles’ frozen tracks, or all frozen tracks in all turtles if called by a system turtle.
clearfrozen
clearallterrain
Takes: none
Returns: none
Clears all terrain in all spaces.
clearallterrain
clearfrozen
Takes: none
Returns: none
Erases all of the calling turtle’s frozen tracks.
clearfrozen
clearimage
Takes: imagename (word)
Returns: none
Clears the specified image from memory.
clearimage "image
clearimages
Takes: none
Returns: none
Clears all iamges from memory.
clearimages
clearmodel
Takes: modelname (word)
Returns: none
Removes the specified model from memory.
clearmodel "model
clearmodels
Takes: none
Returns: none
Removes all user-defined models from memory.
clearmodels
clearplot
Takes: name (word)
Returns: none
Clears the named plot. See plot
clearplot "myplot
clearscreen cs
Takes: none
Returns: none
Clears the turtle’s ‘turtle track’ and sends the turtle to its home position.
clearscreen
clearterrain
Takes: none
Returns: none
Clears all terrain defined in the current space. Terrain created by system turtles will only be cleared if clearterrain is called by a system turtle. See setterrain
clearterrain
clonetag
Takes: sourcetagname (word) | copytagname (word)
Returns: none
Clones a turtle’s tag and puts the new copy at the end of its ‘turtle track’. See tag
clonetag "oldtag "newtag
color
Takes: number
Returns: list
color returns the red, green and blue values of the specified color
show color 5
[128 128 128]
show color brown
[128 80 0]
colors
Takes: none
Returns: list
Returns a list of lists containing all of the colors’ RGB values in order of color index, eg with the first list being [0 0 0] (black) and the 16th list being white [255 255 255]. For an easier-to-read version, see listcolors
show colors
cone cn
Takes: radius (number) | depth (number) | sides (number)
Returns: Creates a cone pointing downward from and centered on the calling turtle.
cone 20 10 20
coneslice csl
Takes: radius (number) | depth (number) | sidestotal (number) | sidesused (number)
Returns: none
Creates a sliced cone.
coneslice 20 20 20 10
conoid cno
Takes: radius (number) | depth (number) | sides (number) | ratio (number)
Returns: Creates a conoid, a cone stretched or compressed based on the provided ratio (1 is normal, 2 is stretched twice as much, 0.5 half as much, etc.)
conoid 20 40 20 2
conoidslice cosl
Takes: radius (number) | depth (number) | sidestotal (number) | sidesused (number) | ratio (number)
Returns: none
Creates a sliced conoid.
conoidslice 20 20 20 10 2
copytag
Takes: tag (word) | turtle (word)
Returns: none
Copies a tag from the calling turtle to the named turtle, at the end of the named turtle’s turtle track.
copytag "tag "turtle
copytrack
Takes: “turtlea (word) | “turtleb (word)
Returns: none
Copies “turtlea’s track (its movements and graphics) to “turtleb, overwriting “turtleb’s existing track. See appendtrack
copytrack "myrtle "bob
csall
Takes: none
Returns: none
Causes all turtles to clear their turtle tracks and return to their starting positions.
csall
cube cb
Takes: size
Returns: none
Creates a wireframe cube of the specified size
cube 20
cuboid cbo
Takes: width | height | depth
Returns: none
Creates a wireframe cuboid of the specified dimensions
cuboid 30 20 10
cutcone cc
Takes: radiusnear (number) | radiusfar (number) | depth (number) | sides (number)
Returns: none
Creates a truncated, or cut, cone. See cone
cutcone 10 20 30 30
cutconeslice ccs
Takes: radiusnear (number) | radiusfar (number) | depth (number) | sidestotal (number) | sidesused (number)
Returns: none
Creats a cut, sliced cone. See coneslice
cutconeslice 20 40 20 20 10
cutconoid cco
Takes: radiusnear (number) | radiusfar (number) | depth (number) | sides (number) | ratio (number)
Returns: none
Creates a truncated, or cut, conoid, stretched based on the provided ratio. See conoid
cutconoid 10 20 30 30 2###
cutconoidslice ccos
Takes: radiusnear (number) | radiusfar (number) | depth (number) | sidestotal (number) | sidesused (number) | ratio (number)
Returns: none
Creates a cut, sliced conoid, stretched based on the provided ratio. See conoid
cutconoidslice 10 20 30 30 15 2
cutfunnel cf
Takes: radiusnear (number) | radiusfar (number) | depth (number) | sides (number)
Returns: none
Creates a cut funnel (an uncapped cut cone).
cutfunnel 20 10 20 20
cutfunneloid cfo
Takes: radiusnear (number) | radiusfar (number) | depth (number) | sides (number) | ratio (number)
Returns: none
Creates a cut funneloid (an uncapped cut conoid).
cutfunneloid 20 30 20 20 0.5
cutfunneloidslice cfos
Takes: radiusnear (number) | radiusfar (number) | depth (number) | sidestotal (number) | sidesused (number) | ratio (number)
Returns: none
Creates a cut, sliced funneloid (an uncapped cut conoid).
cutfunneloidslice 20 30 20 20 10 0.5
cutfunnelslice cfs
Takes: radiusnear (number) | radiusfar (number) | depth (number) | sidestotal (number) | sidesused (number)
Returns: none
Creates a sliced, cut funnel (an uncapped cut cone).
cutfunnelslice 20 10 20 20 10
cutsphere csp
Takes: radius (number) | stacks (number) | sectors (number) | minstack (number) | maxstack (number)
Returns: none
Creates a truncated, or cut, sphere. Can be cut on the top, bottom, or both based on specified minstack and maxstack values. See sphere
cutsphere 30 14 32 4 13
cutsphereslice css
Takes: radius (number) | stacks (number) | totalsectors (number) | minstack (number) | maxstack (number) | usedsectors (number)
Returns: none
Creates a sliced and cut sphere. Can be cut on the top, bottom, or both based on specified minstack and maxstack values. Displays the portion specified by totalsectors and usedsectors. See sphereslice, cutsphere
cutsphereslice 30 20 20 5 15 10
cutspheroid cso
Takes: radius (number) | stacks (number) | sectors (number) | minstack (number) | maxstack (number) | ratio (number)
Returns: none
Creates a truncated, or cut, sphere, stretched by the provided ratio. Can be cut on the top, bottom, or both based on specified minstack and maxstack values. See spheroid
cutspheroid 30 14 32 4 13 0.5
cutspheroidslice csos
Takes: radius (number) | stacks (number) | totalsectors (number) | minstack (number) | maxstack (number) | startsector (number) | endsector (number) | ratio (number)
Returns: none
Creates a sliced and cut spheroid. Can be cut on the top, bottom, or both based on specified minstack and maxstack values. Displays the portion specified by startsector and endsector. Is stretched by the ratio provided. See spheroidslice, cutspheroid
cutspheroidslice 30 20 20 5 15 5 10 2
cylinder cy
Takes: radius (number) | depth (number) | sides (number)
Returns: none
Creates a cylinder
cylinder 20 30 10
cylinderarc cya
Takes: thickness (number) | radius (number) | sides (number) | totalsegments (number) | arcsegments (number)
Returns: none
Creates a partial torus, or curved cylinder.
cylinderarc 5 15 20 20 10
cylinderarcslice cyas
Takes: thickness (number) | radius (number) | sides (number) | totalsegments (number) | arcsegments (number) | startsides (number) | endsides (number)
Returns: Creates a slice of a partial torus, or curved cylinder. Note: If you invert the thickness value, you can ‘slice’ the opposite side.
cylinderarcslice 5 15 20 20 10 5 15
cylinderslice cys
Takes: radius (number) | depth (number) | totalsides (number) | slicesides (number)
Returns: none
Creates a rounded wedge shape, like a slice of a round of cheese, starting at the turtle’s right vector and moving counter-clockwise.
cylinderslice 20 10 20 10
cylindroid cyo
Takes: radius (number) | depth (number) | sides (number) | ratio (number)
Returns: none
Creates a cylindoid
cylindroid 20 30 10 2
cylindroidarc cyoa
Takes: thickness (number) | radius (number) | sides (number) | totalsegments (number) | arcsegments (number) | ratio (number)
Returns: none
Creates a cylinder arc extruded by the provided ratio.
cylindroidarc 5 15 20 20 10 2
cylindroidarcslice cyoas
Takes: thickness (number) | radius (number) | totalsides (number) | totalsegments (number) | arcsegments (number) | startsides (number) | endsides | ratio (number)
Returns: none
Creates a cylinder arc sliced by the provided sides values and extruded by the provided ratio.
cylindroidarcslice 5 15 20 20 10 10 15 2
cylindroidslice cyos
Takes: radius (number) | depth (number) | totalsides (number) | slicesides (number) | ratio (number)
Returns: none
Creates a stretched rounded wedge shape, like a slice of a round of cheese, starting at the turtle’s right vector and moving counter-clockwise, and stretched using the provided ratio, where 1 is normal, 0.5 is half, 2 is double etc.
cylindroidslice 20 10 20 10 0.5
definecolor dfw
Takes: index (number) | list or word
Returns: none
definecolor takes an index number from 0 to 63 and either a list of three values (representing red, green, and blue) with a value from 0 to 100, or a 6-character word representing a color’s RGB values in hexadecimal format, for example ab1274. The color palette defined by definecolor is used for pen and fill colors. To use definecolor to alter the colors used in a turtle model, definecolor must be used inside the turtle model definition. For text colors see definetextcolor
definecolor 20 [50 20 90]
definecolor 21 "ab1274
definecolors
Takes: list of lists
Returns: none
Defines all 64 color palettes based on the provided list of 64 RGB (0-100) values.
definecolors colors
deleteoverlay
Takes: name (word)
Returns: none
Deletes the named overlay.
deleteoverlay "myrtlesview
deleteplot
Takes: name (word)
Returns: none
Deletes the named plot. See plot
deleteplot "myplot
deletesticker
Takes: name (word)
Returns: none
Deletes the sticker with the specified name. See placesticker.
deletesticker "marquee
dodecahedron dod
Takes: size (number)
Returns: none
Creates a dodecahedron (12-sided shape) of the specified size.
dodecahedron 5
dodecahedroid dodo
Takes: size (number) | ratio (number)
Returns: none
Creates a dodecahedroid (12-sided shape) of the specified size and stretched using the specified ratio.
dodecahedroid 5 2
dodecahedroid 10 0.5
dome dm
Takes: radius (number) | stacks (number) | sectors (number)
Returns: none
Creates a dome
dome 20 10 10
domoid dmo
Takes: radius (number) | stacks (number) | sectors (number) | stretch (number)
Returns: none
Creates a stretched dome.
domoid 20 10 10 2
doppel
Takes: modelname (word)
Returns: none
Like stamp, except creates a reference to the provided model rather than copying the model into the turtle track. This means that if the model changes, its doppel representation will also change.
doppel "myrtle
dot
Takes: [x y (z)] (list)
Returns: none
Puts a dot at the specified co-ordinates using the specified _pen_ color (this is for Apple Logo compatibility). If z is not specified, z = 0. Dots are removed by clearscreen but not clean (this is a slight deviation from Apple Logo’s behavior, for utility.) See dots, dotp, dotsize.
dot [10 10]
dots
Takes: none
Returns: list
Returns a list of the co-ordinates of all the dots currently in the calling turtle’s turtle track. See dot, dotp
show dots
dotsize
Takes: none
Returns: size (number)
Returns the calling turtle’s current dot size. See setdotsize, dot, dotp.
show dotsize
duocutconoid dcc
Takes: radiusnear (number) | radiusfar (number) | depth (number) | sides (number) | ratio1 (number) | ratio2 (number)
Returns: none
Creates a cut conoid with two different oid (stretch) ratios, one for each end. See cutconoid, duocutfunneloid
duocutconoid 20 30 20 20 0.5 2
duocutfunneloid dcfo
Takes: radiusnear (number) | radiusfar (number) | depth (number) | sides (number) | ratio1 (number) | ratio2 (number)
Returns: none
Creates a cut funneloid (an uncapped cut conoid) with two different oid (stretch) ratios, one for each end. See cutfunneloid
duocutfunneloid 20 30 20 20 0.5 2
duocylindroid dco
Takes: radius (number) | depth (number) | sides (number) | ratio1 (number) | ratio2 (number)
Returns: none
Creates a cylindroid with two different oid (stretch) ratios, one for each end. See cylindroid, duotuboid
duocylindroid 20 20 20 0.5 2
duotuboid dto
Takes: radius (number) | depth (number) | sides (number) | ratio1 (number) | ratio2 (number)
Returns: none
Creates a tuboid, or stretched tube, with two different oid (stretch) values, one for each end. Can be used to transition between non-oids and oids, or between two oids. See tuboid
duotuboid 10 20 20 0.5 2
elevation
Takes: [x y] (list)
Returns: elevation (number)
Returns the elevation of the terrain at the provided co-ordinates. See setelevation, setterrain
show elevation [10 20]
ellipse ell
Takes: width (number) | height (number)
Returns: none
Creates a pen-drawn ellipse of the specified width and height.
ellipse 50 20
endmark
Takes: none
Returns: none
Creates a half-oval “ending” mark. See mark, startmark
endmark
endrope
Takes: none
Returns: none
Creates a dome “end” to a rope. See rope, startrope
endrope
endtag
Takes: none
Returns: none
Closes the currently open tag. See tag
endtag
erasefrozen
Takes: name (word)
Returns: none
Erases the frozen track of the given name. See freeze, thaw
erasefrozen "frozentrack
erasetag
Takes: tag (word)
Returns: none
Erases the named tag and its contents.
erasetag "mytag
fill
Takes: none
Returns: none
Currently does nothing. This is OpenGL not Photoshop!
fillcolor
Takes: none
Returns: number
Returns the fill color currently used by the selected turtle.
print myrtle:fillcolor
7
fillopacity
Takes: none
Returns: opacity (number)
Returns the current fill opacity
show opacity
fiso
Takes: width height
Returns: none
Creates a filled isosceles triangle with the center of its base at the root of the selected turtle and aligned with the turtle’s orientation. See iso.
fiso 20 10
frag
Takes: none
Returns: none
Makes a triangle from the current position and previous two turtle positions.
forward 20 right 90 forward 20 frag
freeze
Takes: name (word)
Returns: none
‘Freezes’ the calling turtle’s track with the given name, and then switches to a new ’empty’ turtle track, keeping the frozen track visible. Note that frozen tracks are unaffected by reset, clearscreen and need to be erased using thaw, erasefrozen or clearfrozen. If the parameter provided to freeze is given in the form of a single-item list, freeze will overwrite an existing frozen track, otherwise it will throw an error. See thaw, hidefrozen, showfrozen, listfrozen, frozen, erasefrozen and clearfrozen
freeze "mytrack
frozen
Takes: none
Returns: list
Returns a list of the calling turtle’s frozen track. See freeze, thaw.
show frozen
funnel fu
Takes: radius (number) | depth (number) | sides (number)
Returns: Creates a funnel (an uncapped cone).
funnel 20 20 20
funnelslice fus
Takes: radius (number) | depth (number) | sidestotal (number) | sidesused (number)
Returns: none
Creates a sliced funnel.
funnelslice 20 20 20 10
funneloid fuo
Takes: radius (number) | depth (number) | sides (number) | ratio (number)
Returns: Creates a funneloid (an uncapped conoid).
funneloid 20 20 20 0.5
funneloidslice fuos
Takes: radius (number) | depth (number) | sidestotal (number) | sidesused (number) | ratio (number)
Returns: none
Creates a sliced funneloid.
funneloidslice 20 20 20 10 2
gradient
Takes: none
Returns: none
Causes lines, squares, quads, spots, polyspots, spheres, toruses, voxels, cylinders, cylinderarcs, tubes, funnels, cones and pyramids to graduate in color from the pencolor value to the fillcolor value. nogradient disables it. See gradientp
cs gradient randpc randfc repeat 36 [fd 100 rt 170]
hidefrozen
Takes: word
Returns: none
Hides the specified frozen track. See freeze, thaw, showfrozen
hidefrozen "frozentrack
hideoverlay
Takes: name (word)
Returns: none
Hides the specified overlay. See newoverlay
hideoverlay "myrtlesview
hideplot
Takes: plotname (word)
Returns: none
Hides (all) the named plot(s). If you want to show / hide one specific instance of a placed plot (since you can place multiple), place them inside of a tag. See tag, showplot, plot
hideplot "myplot
hidesticker
Takes: name (word)
Returns: none
Hides the sticker specified by the provided name parameter. See placesticker
hidesticker "marquee
hidetag
Takes: tagname (word)
Returns: none
Hides the specified tag from displaying. Be aware that this can alter the display of the rest of the turtle track, as the position of the turtle may be altered by the absence of the tag contents from rendering! To solve this problem, call ‘setposition position’ after calling ‘endtag’ when closing a tag. Then, when you hide the tag, the turtle will still end up in the place it lands when the tag is visible, and the remainder of the turtle track rendering will not be disrupted.
hidetag "mytag
hideterrain
Takes: none
Returns: none
Hides the terrain in the current space. See showterrain.
hideterrain
hidetrack
Takes: none
Returns: none
Hides the calling turtle’s ‘turtle track’ or visible output. Make it visible again with showtrack.
hidetrack
icosphere ico
Takes: radius (number)
Returns: none
Creates an icosphere of a specified radius. See icosphereoid
icosphere 10
icospheroid icd
Takes: radius (number) | multiplier (number)
Returns: none
Creates an icosphereoid of a specified radius, stretched using the provided multiplier.
icosphereoid 10 2
images
Takes: none
Returns: list
Returns a list of the currently defined images.
show images
inscribe
Takes: word, number or list
Returns: none
Renders text shapes alongside and to the front of the turtle rather than to the side (as with typeset) using the same size and color as typeset. Unlike typeset, the turtle does not move. See typeset.
repeat 8 [inscribe se char 32 repcount right 45]
iso
Takes: width height
Returns: none
Draws an isosceles triangle of the specified width and height, with the turtle positioned at the center of the lower side, and the triangle pointing in line with the turtle’s current orientation.
repeat 18 [iso 20 60 rollright 10]
lat
Takes: size
Returns: none
Creates a left-facing right-angle triangle. See rat
lat 20
lightlines
Takes: none
Returns: none
Enables lighting for lines. Normally off by default. As lines have no ‘side’, their ‘normal’ (the direction in which light is reflected) needs to be manually set using setlinesnormal. nolightlines disables it.
lightlines
line
Takes: length (number)
Returns: none
Creates a line of the specified length in front of the calling turtle, without moving that turtle. Line does not respect penup / pendown
repeat 36 [if oddp repcount [line 20] else [line 40] rt 10]
lines
Takes: none
Returns: none
Enables the drawing of OpenGL line primitives if the penwidth value is one or less. On by default. See nolines, which turns off the drawing of OpenGL lines for values less than one, and uses cylinders instead.
lines
listcolors
Takes: none
Returns: none
Prints out the 64 (0-63) color indexes and their associated RGB values. See colors, showcolors
listcolors
listfrozen
Takes: none
Returns: none
Lists the calling turtle’s frozen tracks. See freeze, thaw, showfrozen, frozen
listfrozen
listimages
Takes: none
Returns: none
Lists the calling turtle’s images
listimages
listmodels
Takes: none
Returns: none
Lists the calling turtle’s models
listmodels
listoverlays
Takes: none
Returns: none
Prints a list of the currently defined overlays.
listoverlays
listplots
Takes: none
Returns: none
Prints a list of the currently defined plots.
listplots
loadtag
Takes: tagname (word) | tagfile (word)
Returns: none
Loads the contents of the specified file into the specified tagname. loadtag creates a new tag at the end of the turtletrack if the tagname does not already exist. See savetag
loadtag "mytag "tagfile
loadtrack
Takes: filename (word) or |url| (web)
Returns: none
Loads the saved turtle track, replacing the current turtle track. See savetrack
loadtrack "turtletrack
mark
Takes: turtle-units (number)
Returns: none
Mark moves the turtle forward the specified turtle units, drawing a quad using the ‘marker’ rather than the pen. You can set the diameter of the ‘mark’ using setmarkerwidth
mark 10
merge
Takes: none
Returns: none
Causes the turtle track of a hatchling to merge with its parent at the start of the parents turtle track. The hatchling’s turtle track is empty after the merge. See hatch
merge
modelscale
Takes: none
Returns: scale (number)
Returns the calling turtle’s current modelscale value. Default is 1. See setmodelscale
show modelscale
newmodel
Takes: name (word) | tagname (word) or [command list] (list)
Returns: none
Creates a new model, using either the contents of the specified tag, or the provided list of turtle commands. Note that due to the nature of models, setvectors does not work properly inside of a model definition. See setmodel
newmodel "sphere [icosphere 20]
newmodel "fromtag "tag
newoverlay
Takes: name (word) | turtle (word)
Returns: none
Creates a new camera ‘overlay’ or picture-in-picture with the specified name using the point of view of the specified turtle. You position the overlay on the screen using placeoverlay
newoverlay "myrtlesview "myrtle
newplot
Takes: name (word) | dimensions (list)
Returns: Defines a new plot (a grid of pixels or voxels) with the provided name, and of the provided dimensions. If the list has two numbers, a two-dimensional plot is created. If the list has three numbers, a three-dimensional plot is created. See placeplot
newplot “myplot [10 20]
newplot "myplot [5 5 5]
newsticker
Takes: name (word) | image (word)
Returns: none
Defines a new sticker using the provided image. See placesticker
loadimage "marqueeimage "marquee.png
newsticker "marqueesticker "marqueeimage
nextframe
Takes: none
Returns: none
Waits until the next frame of video is rendered. Useful for creating smooth animations in combination with norender and render (eg render nextframe norender) by otherwise disabling rendering except for one nextframe per loop. Warning: If norender is currently set, nextframe will wait indefinitely!
render nextframe norender
nolines
Takes: none
Returns: none
Disables the drawing of OpenGL line primitives if the penwidth value is one or less. Enabled by default. See lines, which turns on the drawing of OpenGL lines for values less than one, instead of using cylinders.
nolines
nolightlines
Takes: none
Returns: none
Disables line lighting. See lightlines
nolightlines
norender
Takes: none
Returns: none
Disables the renderer. There will be no updates to the graphical output while norender is enabled. This includes view turtle (camera) movement! Pressing the escape key will re-enable render, as will the render primitive. See render
norender
nospeckle
Takes: none
Returns: none
Disables speckling of voxels and quads. See speckle
nospeckle
notrack
Takes: none
Returns: none
Causes the calling turtle not to generate a track and erases any existing track without changing the turtle’s position, after which any shape and graphics primitives are ignored. See track
notrack
notrackrender
Takes: none
Returns: none
Stops the calling turtle’s ‘track’ render from updating. Its current buffered render will continue to be displayed. This is handy for complex scene creation – you can choose to reveal parts of the scene as they are created. See trackrender, hidetrack, showtrack, render, norender
notrackrender
notwosided ntws
Takes: none
Returns: none
Causes the surface of shapes to only be ‘lit’ from one side – in OpenGL parlance, only one side has ‘normals’. This is the default. If you wish both sides of a shape’s surface to be lit, invoke twosided. See twosided
notwosided
octahedron oct
Takes: size (number)
Returns: none
Creates a octahedron (8-sided shape) of the specified size, which is the distance to the farthest tips of the octahedron.
octahedron 5
octahedroid octo
Takes: size (number) | ratio (number)
Returns: none
Creates a octahedroid (8-sided shape) of the specified size and stretched using the specified ratio.
octahedroid 5 2
octahedroid 10 0.5
oval
Takes: width (number) | height (number)
Returns: none
Creates a filled oval of the specified width and height. See ellipse
oval 50 20
overlays
Takes: none
Returns: list
Returns a list of the currently defined overlays.
show overlays
peak
Takes: width | height | depth
Returns: none
Creates a lined wedge around and beneath the calling turtle. The width distance is the distance to one side of the turtle (the total width of the peak is double the provided width value).
peak 10 20 30
pen
Takes: none
Returns: word
Returns the pen state, PENUP or PENDOWN
show pen
PENUP
pencolor pc
Takes: none
Returns: number
Returns the current pen color.
show pencolor
pendown pd
Takes: none
Returns: none
Puts the calling turtle’s ‘pen’ down (causes it to draw a line when moved).
pendown
penopacity
Takes: none
Returns: number
Returns the calling turtles pen opacity. See setpenopacity
shoe penopacity
penshade psh
Takes: none
Returns: shade (number)
Returns the current pen shade value. See setpenshade
show penshade
pensides
Takes: none
Returns: number
Returns the number of sides of the cylinder drawn by the pen primitives when penwidth > 1. See setpensides
show pensides
penup pu
Takes: none
Returns: none
Lifts the calling turtle’s pen up, it won’t draw a line when it moves. See pendown
penup
pie
Takes: degrees (number) | radius (number)
Returns: none
Creates a pie-chart like object of the specified radius and degrees, starting at the turtle’s right vector and moving counter-clockwise.
pie 270 20
pin
Takes: none
Returns: none
Drops a ‘pin’, for use with pinfrag and pinshard
pin
pinfrag
Takes: none
Returns: none
Creates a ‘frag’ using the last three dropped ‘pins’. See pin, frag
pinfrag
pinshard
Takes: none
Returns: none
Creates a ‘shard’ using the last three dropped ‘pins’. See pin, shard
pinshard
placeoverlay
Takes: name (word) | [x1% y1% x2% y2%] (list)
Returns: none
Places the named overlay on the screen over the list of co-ordinates which are specified in terms of percentages. See newoverlay
placeoverlay "myrtlesview [0 0 50 50]
placeplot
Takes: name (word) | voxel / pixel size (list)
Returns: none
Places the named plot at the current turtle position using pixels (by providing a list of two) or voxels (by providing a list of three)
placeplot "myplot [10 10]
would place a plot using pixels 10 turtle-units in size, while
placeplot "myplot [5 5 5]
would place a plot using voxels 5 turtle-units in size
placesticker
Takes: name (word) | [x1% y1% x2% y2%] (list)
Returns: none
Places the sticker with the provided name over the area of the screen specified by the provided list, which is in terms of percentages of the screen dimensions, where 100% is the right / bottom and 0% is the left / top. As the name suggests, a sticker is a static image which does not move with the camera view, as if you stuck a sticker to your display. See stickers, stickerp
loadimage "marquee "marquee.png
newsticker "marqueesticker "marquee
placesticker "marqueesticker [25 25 75 75]
plot
Takes: coordinates (list)
Returns: none
Plots a pixel / voxel at the specified co-ordinates in the currently selected plot. The list may contain two or three numbers depending on if the plot is two- or three-dimensional. See placeplot
plot [10 20]
plot [10 20 10]
plotcol
Takes: coordinates (list)
Returns: number
Returns the color (if any) of the specified pixel / voxel in the currently selected plot. The list of coordinates may contain two or three numbers, depending on if the selected plot is two- or three-dimensional. See plot
show plotcol [10 20]
show plotcol [10 20 10]
plotline
Takes: start co-ordinates (list) | end co-ordinates (list)
Returns: none
Plots a line from and including the first set of provided co-ordinates to and including the second set of provided co-ordinates. The co-ordinates may contain two or three numbers dependent on if the plot has two or three dimensions. See plot
plotline [1 1 1] [5 5 5]
plots
Takes: none
Returns: list
Returns a list of the currently defined plots. See newplot, placeplot, plot
show plots
plottotrack
Takes: plotname (word) | [x y z] list
Returns: instructions (list)
Renders the given plot with the voxel size specified in the given list as a series of instructions that can be passed into setmodel to turn a plot directly into a turtle model (with the turtle’s position being the dead center of the plot). Using plottotrack in isolation will cause the turtle to render the plot. See plot
setmodel “model plottottrack “plot [1 1 1]
plottotrack “plot
poly
Takes: radius (number) | sides (number)
Returns: none
Draws a convex polygon of the specified radius and number of sides.
poly 10 6
polyellipse
Takes: width (number) | height (number) | sides (number)
Returns: none
Draws a convex polygon of the specified dimensions and sides.
polyellipse 20 10 10
polyoval
Takes: width (number) | height (number) | sides (number)
Returns: none
Creates a filled convex polygon of the specified dimensions and sides.
polyoval 10 20 5
polyspot ps
Takes: radius (number) | sides (number)
Returns: Creates a filled convex polygon of the specified radius and number of sides.
polyspot 20 5
prism pri
Takes: width | height | depth
Returns: Creates a lined prism to the right, forward and under the turtle.
prism 20 10 30
pyramid py
Takes: size (number) OR [width height depth] (list)
Returns: none
Creates a pyramid (5-sided shape) of the specified size.
pyramid 10
pyramid [5 10 20]
pyramoid pyo
Takes: size (number) | ratio (number)
Returns: none
Creates a pyramoid (stretched pyramid) of the specified size and stretch ratio.
pyramoid 10 2
quad qd
Takes: width | height
Returns: Creates a ‘quad’, a two-dimensional filled rectangle of the specified width and height, to the front and right of the turtle, unless negative values are provided. If a list of a single item is provided for either parameter, quad will center the shape created on the appropriate turtle axis. See square
quad 20 10
quad -20 -10
ramp
Takes: width (number) | height (number) | depth (number)
Returns: none
Creates a filled wedge, or ‘ramp’ using the provided dimensions.
ramp 10 20 30
randomfillcolor randfc rfc
Takes: none
Returns: none
Sets a random fill color (1 – 15) that is NOT the current fill color. See setfillcolor
randomfillcolor sphere 10
randomfillshade randfs rfs
Takes: none
Returns: none
Sets a random fill shade value between -12 and 12. See setfillshade
randomfillshade
randompencolor randpc rpc
Takes: none
Returns: none
Sets a random pen color (1 – 15) that is NOT the current pen color. See setpencolor
pendown repeat 10 [randvec randompencolor fd 100 home]
randompenshade randps rps
Takes: none
Returns: none
Sets a random pen shade value between -12 and 12. See setpenshade
randpenshade
rat
Takes: length
Returns: none
Creates a filled isosceles right angle triangle with two sides of the same specified length.
rat 20
rect
Takes: width (number) | height (number)
Returns: none
Creates a pen-drawn rectangle of the specified width and height to the front and right of the current turtle, unless a parameter is supplied as a single-item list, in which case the rect is centered on the appropriate turtle axis. See quad, square
rect 10 20
rect [10] 20
replacetag
Takes: name (word) | list
Returns: none
Replaces the contents of the named tag with the contents of the provided list of turtle primitives.
replacetag "mytag [FD 20 RT 90 FD 20 RT 90]
resetmodel
Takes: none
Returns: none
Resets the turtle’s model to its default.
resetmodel
resize
Takes: imagename (word) | [width height] (list)
Returns: none
Resizes the specified image and replaces it.
resize "image [100 50]
rhombus
Takes: width (number) | height (number)
Returns: none
Creates a 2D rhombus of the specified width and height.
rhombus 30 10
ring
Takes: thickness (number) | inner radius (number) | segments (number)
Returns: none
Creates a two-dimensional ring of the specified thickness, inner radius and segments. A segment number of 4 creates a square picture frame, while 3 creates a triangle. See ringarc
ring 10 30 10
ringarc
Takes: thickness (number) | inner radius (number) | totalsegments (number) | arcsegments (number)
Returns: none
Creates a partial ring of the specified number of segments. So, if the totalsegments specified were 10, an arcsegments value of 5 would create a half-ring.
ringarc 10 30 10 5
ringoid
Takes: thickness (number) | inner radius (number) | segments (number) | ratio (number)
Returns: none
Creates a two-dimensional ring of the specified thickness, inner radius and segments, stretched by the provided ratio. See ring
ringoid 10 30 10 2
ringoidarc
Takes: thickness (number) | inner radius (number) | totalsegments (number) | arcsegments (number) | ratio (number)
Returns: none
Creates a partial ringoid of the specified number of segments. So, if the totalsegments specified were 10, an arcsegments value of 5 would create a half-ring. If the arcsegments value provided is a list of two, the segments are created from the first value in the list to the second value. See ringarc, ringoid
ringoidarc 10 30 10 5
ringoidarc 5 10 20 [3 5]
sample
Takes: image (word) | position (list)
Returns: RGBA (list)
Sample returns a list of the RGBA values of the pixel at the specified position (given in terms of percentages, measured from the bottom-left corner of the image) in the specified loaded image. For example, sample “frog [50 50] will return the color of the pixel located at 50% of frog’s height, and 50% of frog’s width. Sample can be used to determine the color of a pixel underneath a turtle, for example, by doing a bit of funky math.
show sample "frog [50 50]
saveimage
Takes: image | filename
Returns: none
Saves an internally stored image. Useful for saving internally created or modified images.
saveimage "myimage "imagefile
savemodel
Takes: modelname (word) | modelfile (word)
Returns: none
Saves the specified model name into the specified model file. See loadmodel
savemodel "mymodel "modelfile.mdl
savetag
Takes: tagname (word) | tagfile (word)
Returns: none
Saves the contents of the specified tag to the specified filename. See loadtag
savetag "mytag "tagfile
savetrack
Takes: filename
Returns: none
Saves the calling turtle’s ‘turtle track’ to a file.
savetrack
selectplot
Takes: name (word)
Returns: none
Selects the named plot for use with plot, unplot, plotcol. See plot
selectplot "myplot
setdotsize
Takes: size (number)
Returns: none
Sets the calling turtle’s dot size. All of a turtle’s dots are of the same size, but different turtles can have different-sized dots. See dotsize, dot, dotp.
setdotsize 5
setelevation
Takes: [x y elevation] list OR [[x y elevation][x2 y2 elevation2]…]]
Returns: Sets the elevation height of the terrain at the specified x and y co-ordinates. If a floor value is set in the terrain impacted by setelevation, the elevation will be set to the floor value if it is greater than the elevation specified, unless the new elevation is provided as a list of a single value. setelevation can also take list of lists. See elevation, setterrain
setelevation [10 20 10]
setfillcolor setfc sfc
Takes: color (number)
Returns: none
Sets the ‘fill’ color used by the turtle when creating shapes.
setfillcolor 3
setfillcolor blue
setfillshade setfs sfs
Takes: shade (number)
Returns: none
Sets the shade of the fill color to be displayed when rendering subsequent shapes. It can be set to a number from 0 to 15, which represents a decrease in brightness of the fill color of 6.25 times that number. So, a value of 8 decreases the brightness by 50%. Negative shade values add 1/16th of the difference between each of the base RGB values of the color and 255
setfillshade 5
setfillopacity setfo
Takes: opacity (number)
Returns: none
Sets the fill opacity, takes a number from 0 to 100.
setfillopacity 50
seticosphereiterations sisi
Takes: number
Returns: none
Sets the complexity of the icosphere, from 0 to 3
seticosphereiterations 3
setlinesnormal
Takes: vector (list)
Returns: none
Sets the ‘normal’ vector to be used by lightlines. All lines use the same vector. This is easiest taken from a turtle. Remember that if you take the forwarddir from Snappy, you will need to reverse it, using vectorsub! See lightlines
setlinesnormal vectorsub snappy:forwarddir [0 0 0]
setmarkerwidth smw
Takes: radius (number)
Returns: none
Sets the width of the mark primitive. The default is 2. See mark
setmarkerwidth 10
setoverlayresolution
Takes: name (word) | ratio (number)
Returns: none
Sets the resolution or pixel density of the named overlay, based on a ratio where 1 is 512 pixels by 384 pixels (at a 16:9 ratio)
setoverlayresolution "myrtlesview 2
setoverlaytransparency
Takes: name (word) | boolean
Returns: none
Turns on background transparency for the specified overlay. If transparency is off, the background color in the overlay view is solid.
setoverlaytransparency "myrtlesview on
setoverlayupdate
Takes: name (word) | frames per second (number)
Returns: none
Sets the update frequency of the named overlay to the provided number of frames per second. See newoverlay
setoverlayupdate "myrtlesview 10
setpencolor setpc spc
Takes: color (number)
Returns: none
Sets the pen color to the provided color index. Note that there are a number of color functions that return their corresponding numbers, such as yellow and blue, that can be used in place of a number. See colors
setpencolor yellow
setpc 13
setpenshade setps sps
Takes: shade (number)
Returns: none
Sets the shade of the pen color to be displayed when rendering subsequent lines. It can be set to a number from 0 to 15, which represents a decrease in brightness of the pen color of 6.25 times that number. So, a value of 8 decreases the brightness by 50%.
setpenshade 5
setpenopacity setpo
Takes: number
Returns: none
Sets the pen’s opacity. Takes a number from 0 to 100.
setpenopacity 50
setpensides
Takes: sides (number)
Returns: none
Sets the number of sides of the cylinder created by the pen primitives when the penwidth is > 1. The default is 10. See pensides
setpensides 3
setpenwidth spw setpw
Takes: number
Returns: none
Sets the width of the pen. If the penwidth is set higher than 1, cylinders are drawn instead of lines (as OpenGL has deprecated other line widths). You can also supply a list of two widths, the first being the starting width of the line, and the second being the ending width of the line. See setpensides to set the number of sides larger penwidths have. Note that because multiple pen sizes may now be used in the same creation, clearscreen resets the penwidth. See also mark (for wider, two-dimensional lines) and nolines (which causes lines one or less in thickness to be rendered using cylinders)
setpenwidth 5
setpenwidth [5 10]
setspecklecolors
Takes: list
Returns: none
Takes a list of colors to be used in the generation of speckle patterns. If you want to weight a random speckle towards a particular color, simply include it more than once in the request, such as the example below.
setspecklecolors [1 1 1 1 2 2 3]
setspecklecolors {:col1 :col1 :col2}
setspeckleplot
Takes: plotname (word)
Returns: none
Selects the name of the plot to use to generate a speckle, if using the plot style with speckle.
setspeckleplot "myplot
setspecklesize
Takes: turtleSteps
Returns: none
Sets the pixel size used in generating speckles, in turtleSteps.
setspecklesize 1
setspecklestyle
Takes: “styletype
Returns: none
Selects the style to use when generating speckles. You can choose from “repeat “dither “random or “plot.
setspecklestyle "random
setspheroidaxis ssa
Takes: boolean
Returns: none
Sets the axis by which spheroids are stretched. 0 is equatorial while 1 is polar. See spheroidaxis
setspheroidaxis 1
setterrain
Takes: [x1 y1 x2 y2] (list) | [height floor ceiling] (list) | seed (number) | algorithm (word) OR [algorithm magnification] | style (word)
Returns: none
Creates terrain on the z-plane between the specified x and y co-ordinates. These co-ordinates represent 10 turtle-units, and the output can be scaled using setterrainresolution. height specifies the maximum height in terms of single turtle-units, similarly scaled using setterrainresolution. The floor value specifies the lowest level rendered, and any values lower than that value are rendered at the floor level. Similarly, the ceiling value represents the highest value rendered, and anything higher is lowered to that value. The seed is provided to the algorithm that generates the terrain, the algorithm is the method used (currently only fbm and flat (no algorithm) are supported) and the style (voxel, line, triangle or combo (line and triangle) — note that combo uses the terraininterior color to render its lines). Providing a list containing the algorithm type and a multiplier allow you to ‘zoom in’ or out on the terrain, making it more dense and complex, or spacious and simple. Multiple blocks of terrain can be defined so long as they do not overlap. See terrain, setterrainresolution, setterraincolors, setterraininterior, setelevation, elevation, lockelevation, elevationsnap, unlockelevation
setterrain [-10 -10 10 10] [25] 25 "fbm "voxel
setterraincolors
Takes: [[maxelev fillcolor fillshade][maxelev2 fillcolor fillshade]…] (list of lists)
Returns: none
Sets the terrain colors used in subsequent terrain creation. Lower elevations override higher ones. See setterrain, terraincolors
setterraincolors [[10 2 0] [14 4 0] [18 15 0]]
setterraininterior
Takes: number
Returns: none
Sets the color of the interior of terrain subsequently generated using the setterrain primitive. See setterrain, setterraincolors
setterraininterior brown
setterrainresolution
Takes: number
Returns: none
Sets the ‘resolution’ of the terrain, or the size of each ‘sector’ in turtle-units within the terrain ‘grid’ which expands out from [0 0]. For example, the higher the terrainresolution is the larger each voxel is in the terrain in the voxel mode, and the more area the terrain covers. See setterrain, terrainresolution
setterrainreolution 5
settypedelay stde
Takes: 60ths-of-a-second (number)
Returns: none
Sets a delay between the rendering of each letter rendered by ‘typeset’. This delay is specified in 60ths of a second – 60 equalling one second. See typeset
settypedelay 60
settypedepth std
Takes: turtle-units (number)
Returns: none
Sets the depth of three-dimensional type created by ‘typeset’. See typeset
settypedepth 3
settypefont stf
Takes: font-id (number)
Returns: none
Sets the font used for ‘typeset’. Default is 1. See settextfont
settypefont 1
settypefilled stfi
Takes: boolean
Returns: none
If set true (default), typeset and inscribe create ‘filled’ characters. If false, they create lined cube characters.
settypefilled false
settypesize sts
Takes: size (number)
Returns: none
Sets the size (in turtle units) of the font used by typeset and inscribe. See typeset
settypesize 10
settypestretch str
Takes: ratio
Returns: none
Stetches text rendered using typeset or inscribe by the specified ratio.
settypestretch 2
setview sv
Takes: turtle (word)
Returns: none
Sets the current “view turtle” – the turtle from whose viewpoint the display is generated.
setview "myrtle
setviewfar
Takes: distance (number)
Returns: none
Sets the far clipping plane, the distance at which OpenGL objects stop being rendered or are clipped. This must be set by the view turtle. See setviewnear
setviewfar 1000
setviewfov
Takes: angle (number)
Returns: none
Sets the turtle’s viewing angle, the angle of view displayed in the window. The default is 60
setviewfov 60
setviewnear
Takes: distance (number)
Returns: none
Sets the near clipping plane. OpenGL objects closer than this distance are not rendered or are clipped. This must be set by the view turtle. See setviewfar
setviewpoint
Takes: list
Returns: none
Positions the view by the provided [X (left-right) Y (down-up) Z (back-forward)] list of turtle units, where a negative value has the first effect and a positive value has the second effect.
setviewpoint [10 -10 0]
setviewvectors
Takes: vectors (list)
Returns: none
Sets arbitrary view vectors for the current turtle. When selected as a view (camera) turtle, if viewvectors are set the display will always be rendered in the direction and orientation specified by those vectors, regardless of the turtle’s orientation. To return to using the turtle’s orientation, specify an empty list, eg: setviewvectors []
setviewvectors vectors
setzoom
Takes: percentage (number)
Returns: none
Sets the view turtle’s camera ‘zoom’ – the default is 100%
setzoom 50
shard
Takes: depth (number)
Returns: none
Creates a ‘shard’ or a three-dimensional fragment using the current and two previous turtle positions with a depth specified by its input parameter.
shard 10
showfrozen
Takes: word
Returns: none
Shows the specified frozen track. See freeze, thaw, hidefrozen
showfrozen "frozentrack
showoverlay
Takes: name (word)
Returns: none
Shows the specified overlay. See newoverlay
showoverlay "myrtlesview
showplot
Takes: plotname (word)
Returns: none
Shows (all) the named plot(s). If you want to show / hide one specific instance of a placed plot (since you can place multiple), place them inside of a tag. See tag, hideplot, plot
showplot "myplot
showsticker
Takes: name (word)
Returns: none
Shows the sticker with the provided name. See placesticker
show "marquee
showtag
Takes: tag (word)
Returns: none
Shows (makes visible) the specified tag. See tag
showtag "mytag
showterrain
Takes: none
Returns: none
Shows the terrain. See hideterrain, setterrain
showterrain
showtrack
Takes: none
Returns: none
Shows the calling turtles ‘turtle track’ or visible output. See hidetrack
showtrack
skewfiso skf
Takes: width (turtle-units) | height | degrees
Returns: none
Creates a filled isosceles triangle “skewed” by the given number of degrees in the X axis. Negative degree values are an acceptable input. See fiso
skewfiso 50 100 45
skewiso ski
Takes: width (turtle-units) | height | degrees
Returns: none
Creates an isosceles triangle “skewed” by the given number of degrees in the X axis. Negative degree values are an acceptable input. See iso
skewiso 50 100 45
skewpyramid skp
Takes: size (turtle-units) OR [width height depth] (list) | degrees X | degrees Z
Returns: none
Creates a pyramid “skewed” by the specified number of degrees in the X and Z directions.
skewpyramid 50 45 45
skewpyramoid skpo
Takes: size (turtle-units) OR [width height depth] | stretch (ratio) | degrees X | degrees Z
Returns: none
Creates a pyramid “skewed” by the specified number of degrees in the X and Z directions, and stretched by the specified ratio
skewpyramoid 50 3 45 45
skewquad skq
Takes: width (turtle-units) | height (turtle-units) | degrees
Returns: none
Creates a quad “skewed” by the specified number of degrees, a value which can be negative. See quad
skewquad 50 50 45
skewrect skr
Takes: width (turtle-units) | height | degrees
Returns: none
Creates a “skewed” rectangle of the given width and height, skewed by the specified number of degrees, a value which can be negative.
skewrect 100 50 -45
skewtraperect sktr
Takes: width (turtle-units) | height | ratio | degrees
Returns: none
Creates a “skewed” trapezoidal rectangle of the specified width and height, whose top is affected by the provided ratio and who is skewed by the specified number of degrees, a value which can be negative. See rect
skewtraperect 100 100 0.5 45
skewtrapevoxeloid skvo
Takes: width | height | depth | ratio-W | ratio-D | degrees X | degrees Z
Returns: none
Creates a skewed trapezoidal voxel, the width and depth of whose “top” or side in front of the turtle is stretched or contracted by the given ratios (depth and width), and who is then skewed by the given degree values in the X and Z axis, which can be negative. See trapevoxeloid
skewtrapevoxeloid 50 50 50 0.5 2 45 45
skewtrapezoid skt
Takes: width (turtle-units) | height | ratio | degrees
Returns: none
Creates a skewed trapezoidal quad of the specified width and height, whose top is affected by the provided ratio and who is skewed by the specified number of degrees, a value which can be negative.
skewtrapezoid 100 100 0.5 45
skewvoxeloid skv
Takes: width (turtle-units) | height | depth | degrees X | degrees Z
Returns: none
Creates a “skewed” voxeloid of the specified dimensions, distorted on the X and Z axis by the specified number of degrees, which can be negative.
skewvoxeloid 100 100 100 45 45
snapshot
Takes: imagename (word)
Returns: none
Takes a snapshot of the screen and places it into the internal image library with the given imagename. That image can then be used with ‘sample’ to provide basic 2D collision detection, or used on a ‘billboard’. See listimages, sample, billboard
snapshot "screenshot
speckle
Takes: none
Returns: none
Enables ‘speckling’ (generated pixelated texturing) of any following square, quad, voxel and voxeloid shapes. These are configured using setspecklestyle (repeat, random or plot), setspecklecolors, setspecklesize and optionally setspeckleplot. nospeckle disables speckling
speckle
specklecolors
Takes: none
Returns: list
Returns the currently defined speckle colors. See speckle
show specklecolors
speckleplot
Takes: none
Returns: word
Returns the plot currently used by speckle in the plot style. See setspecklestyle
show speckleplot
specklesize
Takes: none
Returns: number
Returns the currently defined speckle size. See setspecklesize, speckle
show specklesize
specklestyle
Takes: none
Returns: word
Returns the current speckle style. See speckle
show specklestyle
"random
sphere sph
Takes: radius (number) | stacks (number) | sectors (number)
Returns: none
Creates a sphere of the specified radius using the specified number of stacks and the specified number of sectors. Small stack and sector values create interesting shapes. As opposed to icosphere
sphere 20 10 10
sphereslice sphs
Takes: radius (number) | stacks (number) | sectorstotal (number) | sectorsused (number)
Returns: none
Creates a partial sphere of the overall specified radius, using the specified number of vertical ‘stacks’, and specified number of horizontal ‘sectors’, based on the given total number of sectors, and the used (displayed) number of sectors. Like an orange cut vertically. See cutsphere, cutsphereslice
sphereslice 20 10 10 5
spheroid spd
Takes: radius (number) | stacks (number) | sectors (number) | multiplier (number)
Returns: none
Creates an spheroid of a specified radius, stacks and sectors, stretched using the provided multiplier.
sphereoid 20 10 10 2
spheroidaxis
Takes: none
Returns: boolean
Returns the current spheroid axis, the axis along which spheroids are stretched. 0 is equatorial and 1 is polar.
show spheroidaxis
spheroidslice spds
Takes: radius (number) | stacks (number) | sectorstotal (number) | startsector (number) | endsector (number) | multiplier (number)
Returns: none
Creates a partial spheroid of the overall specified radius, using the specified number of vertical ‘stacks’, and specified number of horizontal ‘sectors’, based on the given total number of sectors, and the startsector and endsector values, and stretched using the provided multiplier. Like a squashed orange cut vertically. See cutspheroid, cutspheroidslice
spheroidslice 20 10 10 5 10 2
spot sp
Takes: radius (number)
Returns: none
Creates a filled circle of the specified radius.
spot 50
square sq
Takes: size (number)
Returns: none
Creates a filled square of the specified size. If the parameter is supplied as a single-item list, then the square is centered on the turtle.
square 20
square [20]
stamp
Takes: modelname (word)
Returns: none
‘Stamps’ a copy of the specified model at the current location using the current model scale.
cs pu repeat 20 [setmodelscale repcount / 10 stamp "plane fd 3 * repcount]
startmark
Takes: none
Returns: none
Creates a half-oval “starting” mark. See mark, endmark
startmark
startrope
Takes: none
Returns: none
Creates a half-dome starting “cap” to a rope. See rope, endrope
startrope
stickers
Takes: none
Returns: list
Returns the currently defined stickers. See newsticker
show stickers
switchtag
Takes: tag1 (word) | tag2 (word)
Returns: none
Hides tag1 and shows tag2, like flipping a switch. See tag
switchtag "tag1 "tag2
synctrackrender
Takes: turtles (list)
Returns: none
Resumes rendering the tracks of all the named turtles simultaneously. Useful when animating to avoid desynchronization. See trackrender, notrackrender.
synctrackrender [myrtle shelly]
tag
Takes: name (word)
Returns: list
Returns the contents of a tag, as a list of turtle primitives. See begintag
show tag "mytag
tags
Takes: none
Returns: list
Returns a list of the current turtle’s defined tags.
show tags
tent
Takes: half-width (number) | height (number) | depth (number)
Returns: none
Creates an opaque (solid) prism to the left, right and front of the turtle.
tent 10 10 5
terrain
Takes: none
Returns: list
Returns the parameters provided to the last invocation of the setterrain primitive. See setterrain
show terrain
terraincolors
Takes: none
Returns: list
Returns the current terrain colors. New terrain generated will use these values. See setterraincolors
show terraincolors
terraininterior
Takes: none
Returns: number
Returns the current terraininterior value. New terrain generated will use this value. See setterraininterior
show terraininterior
terrainresolution
Takes: none
Returns: number
Returns the value of the terrainresolution. See terrainresolution, setterrain
show terrainresolution
tetrahedron th
Takes: size (number)
Returns: none
Creates a tetrahedron (4-sided shape) of the specified size.
tetrahedron 5
tetrahedroid tho
Takes: size (number) | ratio (number)
Returns: none
Creates a tetrahedroid (4-sided shape) of the specified size and stretched using the specified ratio.
tetrahedroid 5 2
tetrahedroid 10 0.5
thaw
Takes: name (word)
Returns: none
Restores the named frozen turtle track, placing the turtle at its end. If the current track is not frozen before thawing, it is discarded. See freeze, hidefrozen, showfrozen, listfrozen, frozen, erasefrozen, clearfrozen
thaw "mytrack
toroid tro
Takes: thickness (number) | radius (number) | sides (number) | segments (number) | ratio (number)
Returns: none
Creates a torusoid, an extruded three-dimensional ring, stretched by a ratio where 1 is a normal torus.
torus 10 30 4 16 0.5
toroidslice tros
Takes: thickness (number) | radius (number) | sides (number) | totalsegments (number) | startsides (number) | endsides (number) | ratio
Returns: none
Creates a ‘slice’ of a torus, based on the startsides and endsides value. Note that using a negative thickness value inverts the slice.
toroidslice 5 15 20 20 10 15 2
toroidslice -5 15 20 20 10 15 2
torusslice trs
Takes: thickness (number) | radius (number) | sides (number) | totalsegments (number) | startsides (number) | endsides (number)
Returns: none
Creates a ‘slice’ of a torus, based on the startsides and endsides value. Note that using a negative thickness value inverts the slice.
torusslice 5 15 20 20 10 15
torusslice -5 15 20 20 10 15
torus tr
Takes: thickness (number) | radius (number) | sides (number) | segments (number)
Returns: none
Creates a torus, also known as a rhombus or a donut, a three-dimensional ring. Sides and segments can be as low as 3.
torus 10 30 4 16
track
Takes: none
Returns: none
Allows the calling turtle’s track to be created. See notrack
track
trackcount
Takes: none
Returns: number
Returns the number of items in the current turtle’s track.
show trackcount
trackitem
Takes: number
Returns: list
Returns the number last track item in the selected turtle’s track, where 1 returns the latest track entry
show trackitem 1
tracklist
Takes: number
Returns: list
Returns the last number latest track items in forward chronological order, the first being the oldest and the last being the newest and most recent.
show tracklist 5
trackrender
Takes: none
Returns: none
Causes the calling turtle’s ‘track’ to be rendered (updated) by the graphics renderer from the point it is called onwards. See notrackrender
trackrender
traperect tre
Takes: width (turtle-units) | height | ratio
Returns: none
Creates a trapezoidal rectangle of the given width, height and with its far end contracted or expanded by the given ratio. See rect
traperect 50 50 2
trapevoxeloid tvo
Takes: width (turtle-units) | height | depth | ratio-W | ratio-D
Returns: none
Creates a trapezoidal voxel, whose far ‘end’ is affected by the given width and depth ratios.
trapevoxeloid 50 50 50 0.5 2
trapezoid tz
Takes: width (turtle-units) | height | ratio
Returns: none
Creates a quad whose far ‘end’ is expanded or contracted based on the provided ratio. See quad, skewtrapezoid
trapezoid 100 50 5
triangle tri
Takes: width (number) | height (number)
Returns: none
Creates a wireframe (pen-drawn) right-angle triangle to the front and right of the turtle.
triangle 10 20
tube tb
Takes: radius (number) | depth (number) | sides (number)
Returns: none
Creates a hollow tube.
tube 10 20 20
tubearc tba
Takes: thickness (number) | radius (number) | sides (number) | totalsegments (number) | arcsegments (number)
Returns: none
Creates a tube arc.
tubearc 5 15 20 20 10
tuboidarc tboa
Takes: thickness (number) | radius (number) | sides (number) | totalsegments (number) | arcsegments (number) | ratio (number)
Returns: none
Creates a tube arcoid (extruded based on the provided ratio).
tuboidarc 5 15 20 20 10 2
tubearcslice tbas
Takes: thickness (number) | radius (number) | sides (number) | totalsegments (number) | arcsegments (number) | startsides (number) | endsides (number)
Returns: Creates a slice of a partial tube. Note: If you invert the thickness value, you can ‘slice’ the opposite side.
tubearcslice 5 15 20 20 10 5 15
tubeslice tbs
Takes: radius (number) | depth (number) | sidestotal (number) | sidesused (number)
Returns: none
Creates a ‘slice’ of a tube, based on the sidestotal and sidesused values.
tubeslice 20 20 10 4
tuboid tbo
Takes: radius (number) | depth (number) | sides (number) | ratio (number)
Returns: none
Creates a tuboid, or stretched tube.
tuboid 10 20 20 0.5
tuboidarc tboa
Takes: thickness (number) | radius (number) | sides (number) | totalsegments (number) | arcsegments (number) | ratio (number)
Returns: none
Creates a tube arc extruded by the provided ratio.
tuboidarc 5 15 20 20 10 2
tuboidarcslice tboas
Takes: thickness (number) | radius (number) | totalsides (number) | totalsegments (number) | arcsegments (number) | startsides (number) | endsides | ratio (number)
Returns: none
Creates a tube arc sliced by the provided sides values and extruded by the provided ratio.
tuboidarcslice 5 15 20 20 10 10 15 2
tuboidslice tbos
Takes: radius (number) | depth (number) | sidestotal (number) | sidesused (number) | ratio (number)
Returns: none
Creates a stretched ‘slice’ of a tube, based on the sidestotal and sidesused values, and the stretching ratio (normal is 1, half is 0.5, double is 2 etc.)
tuboidslice 10 20 20 10 0.5
tuboidslice 10 20 20 10 2
twosided tws
Takes: none
Returns: none
Lights both sides of the surface of a shape. Useful for shapes where both sides of the surface are visible. The default is that they are unlit. Whether to use twosided or not is a purely stylistic choice in most cases. See notwosided, which turns twosided off.
twosided
typeset
Takes: word or [list]
Returns: Typeset renders the provided word or list as three-dimensional text to the right of the turtle one character at a time, moving the turtle to the right as it does so.
typeset [Welcome to turtlespaces!]
typeset {[Happy New Year] year [!]}
typedepth
Takes: none
Returns: depth (number)
Returns the current depth of text rendered using typeset. See typeset
show typedepth
typefont
Takes: none
Returns: font (number)
Returns the index of the font used by typeset. See typeset
show typefont
typesize
Takes: none
Returns: size (number)
Returns the size of the text rendered by typeset. See typeset.
show typesize
typestretch
Takes: none
Returns: size (number)
Returns the ratio by which text rendered by typeset will be stretched. See typeset.
show typestretch
unplot
Takes: co-ordinates [list]
Returns: none
‘Unplots’ or removes the pixel / voxel from the selected plot at the provided co-ordinates. The list of coordinates may contain two or three numbers, depending on if the selected plot is two- or three-dimensional. See plot
unplot [10 10]
unplot [20 10 10]
viewfar
Takes: none
Returns: turtle-units (number)
Returns the value of the far clipping plane. See setviewfar
show viewfar
viewfov
Takes: none
Returns: angle (number)
Returns the current viewing angle, or field of view. See setviewfov
show viewfov
viewnear
Takes: none
Returns: turtle-units (number)
Returns the current near clipping plane. See setviewnear
show viewnear
viewvectors
Takes: none
Returns: list
Returns the calling turtle’s view vectors. See setviewvectors
show viewvectors
voxel vx
Takes: turtle-steps or [turtle-steps]
Returns: none
Creates a filled cube turtle-steps wide, high and deep to the right, forward and down of the turtle, unless the parameter is provided as a list, in which case the voxel is created around the turtle. See voxeloid.
voxel 20
voxel [20]
voxeloid vxo
Takes: turtle-steps-right turtle-steps-forward turtle-steps-deep
Returns: none
Creates a filled cuboid to the right, forward and down of the turtle. If any parameter is provided as a list, eg [20], then center the voxel on that axis. See voxel.
voxeloid 10 20 30
voxeloid 10 [20] 30
voxeloid [10] [20] [30]
wedge
Takes: turtle-steps-right turtle-steps-forward
Returns: Creates a filled right-angle triangle turtle-steps-right from the turtle and turtle-steps-forward from the turtle in dimensions.
wedge 20 4