Référence › Type and Plot — 34 commandes
clearplot
Entrée: name (word)
Sortie: none
Clears the named plot. See plot
clearplot "myplot
deleteplot
Entrée: name (word)
Sortie: none
Deletes the named plot. See plot
deleteplot "myplot
deleteplots
Entrée: none
Sortie: none
Deletes all plots. See plot
deleteplots
hideplot
Entrée: plotname (word)
Sortie: 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
inscribe
Entrée: word, number or list
Sortie: 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]
listplots
Entrée: none
Sortie: none
Prints a list of the currently defined plots.
listplots
newplot
Entrée: name (word) OR [name color] OR [name [color shade]] | dimensions (list)
Sortie: none
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. If a list is provided as the name parameter, the second list item is the default color number of the plot. If this is itself a list, the second item is the shade number of the plot. See placeplot
newplot "myplot [10 20]
newplot [myplot 7] [5 5 5]
newplot [myplot [7 5] [10 10 10]
placeplot
Entrée: name (word) OR [milliseconds name1 name2…] | voxel / pixel size (list)
Sortie: 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). If a list is provided as the name, the first value in the list is delay between animation frames, and the subsequent list items are the names of the plots to be used as frames. If the list items for the voxel/pixel sizes are themselves specified as single list items (eg [[5] [10]]) then the plot is centered on the turtle on the listed axes.
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
plot
Entrée: coordinates (list)
Sortie: 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. The plot grid starts in the top-left corner (based on the orientation of the turtle when the plot is placed) and the co-ordinates start with 1 (so the top-left corner is [1 1]. See placeplot, which places a plot into the environment.
plot [10 20]
plot [10 20 10]
plotcol
Entrée: coordinates (list)
Sortie: 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]
plotfill
Entrée: [x y (z)] (list)
Sortie: none
Flood-fills the selected plot starting at the given co-ordinate using the current fillcolor. Fills only along the same Z-plane.
plotfill [4 5]
plotimage
Entrée: image-name (word)
Sortie: none
Renders the given previously-loaded image into the currently selected plot. Note that rendering images to large plots can take some time!
plotimage "image
plotline
Entrée: start co-ordinates (list) | end co-ordinates (list)
Sortie: 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
Entrée: none
Sortie: list
Returns a list of the currently defined plots. See newplot, placeplot, plot
show plots
plotsize
Entrée: plot-name (word)
Sortie: plot-dimensions (list)
Returns the dimensions of the given plot. See plot
show plotsize "plot
plottotrack
Entrée: plotname (word) | [x y z] list
Sortie: 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
selectedplot
Entrée: none
Sortie: name (word)
Returns the name of the currently selected plot. See selectplot
show selectedplot
selectplot
Entrée: name (word)
Sortie: none
Selects the named plot for use with plot, unplot, plotcol. See plot
selectplot "myplot
settypedelay
Aussi: stde
Entrée: 60ths-of-a-second (number)
Sortie: 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
Aussi: std
Entrée: turtle-units (number)
Sortie: none
Sets the depth of three-dimensional type created by 'typeset'. See typeset
settypedepth 3
settypefont
Aussi: stf
Entrée: font-id (number) OR font-name (word)
Sortie: none
Sets the font used for typeset and inscribe. If a number is provided, this selects a 'bitmap' font. If a word is provided, this selects the associated webfont. You can see a list of some compatible webfonts by typing 'show typefonts' Default is 1. See settextfont
settypefont 1
settypefont |Anonymous Pro|
settypefilled
Aussi: stfi
Entrée: boolean
Sortie: none
If set true (default), typeset and inscribe create 'filled' characters. If false, they create lined cube characters using the voxel fonts, outlined characters using the webfonts.
settypefilled false
settypelined
Aussi: stli
Entrée: boolean
Sortie: none
If set true (default) and a webfont is selected, typeset and inscribe create outlined characters using the current pen style. If false, they create filled characters. It is possible for both typelined and typefilled to be true, but not possible for both to be false. If making one false would make both false, the opposite one will become true. See typelined, settypefilled
settypelined false
settypesize
Aussi: sts
Entrée: size (number)
Sortie: none
Sets the size (in turtle units) of the font used by typeset and inscribe. See typeset
settypesize 10
settypewidth
Aussi: stw
Entrée: ratio
Sortie: none
Stetches text rendered using typeset or inscribe by the specified ratio.
settypewidth 2
showplot
Entrée: plotname (word)
Sortie: 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
typeset
Entrée: word or [list]
Sortie: none
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
Entrée: none
Sortie: depth (number)
Returns the current depth of text rendered using typeset. See typeset
show typedepth
typefont
Entrée: none
Sortie: font (number)
Returns the index of the font used by typeset. See typeset
show typefont
typefonts
Entrée: none
Sortie: fonts (list)
Returns a selection of web fonts that can be used by typeset. See typeset
show typefonts
typesize
Entrée: none
Sortie: size (number)
Returns the size of the text rendered by typeset. See typeset.
show typesize
typewidth
Entrée: none
Sortie: size (number)
Returns the ratio by which text rendered by typeset will be stretched. See typeset.
show typewidth
unplot
Entrée: co-ordinates [list]
Sortie: 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]
typeface
Entrée: none
Sortie: word
Returns the current typeface (font) being used for text output.
print typeface