Spis poleceń › Type and Plot — poleceń: 34


clearplot

type and plot

Wejście: name (word)
Wyjście: none

Clears the named plot. See plot

clearplot "myplot

deleteplot

type and plot

Wejście: name (word)
Wyjście: none

Deletes the named plot. See plot

deleteplot "myplot

deleteplots

type and plot

Wejście: none
Wyjście: none

Deletes all plots. See plot

deleteplots

hideplot

type and plot

Wejście: plotname (word)
Wyjście: 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

type and plot

Wejście: word, number or list
Wyjście: 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

type and plot

Wejście: none
Wyjście: none

Prints a list of the currently defined plots.

listplots

newplot

type and plot

Wejście: name (word) OR [name color] OR [name [color shade]] | dimensions (list)
Wyjście: 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

type and plot

Wejście: name (word) OR [milliseconds name1 name2…] | voxel / pixel size (list)
Wyjście: 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

type and plot

Wejście: coordinates (list)
Wyjście: 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

type and plot

Wejście: coordinates (list)
Wyjście: 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

type and plot

Wejście: [x y (z)] (list)
Wyjście: 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

type and plot

Wejście: image-name (word)
Wyjście: 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

type and plot

Wejście: start co-ordinates (list) | end co-ordinates (list)
Wyjście: 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

type and plot

Wejście: none
Wyjście: list

Returns a list of the currently defined plots. See newplot, placeplot, plot

show plots

plotsize

type and plot

Wejście: plot-name (word)
Wyjście: plot-dimensions (list)

Returns the dimensions of the given plot. See plot

show plotsize "plot

plottotrack

type and plot

Wejście: plotname (word) | [x y z] list
Wyjście: 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

type and plot

Wejście: none
Wyjście: name (word)

Returns the name of the currently selected plot. See selectplot

show selectedplot

selectplot

type and plot

Wejście: name (word)
Wyjście: none

Selects the named plot for use with plot, unplot, plotcol. See plot

selectplot "myplot

settypedelay

Także: stde

type and plot

Wejście: 60ths-of-a-second (number)
Wyjście: 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

Także: std

type and plot

Wejście: turtle-units (number)
Wyjście: none

Sets the depth of three-dimensional type created by 'typeset'. See typeset

settypedepth 3

settypefont

Także: stf

type and plot

Wejście: font-id (number) OR font-name (word)
Wyjście: 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

Także: stfi

type and plot

Wejście: boolean
Wyjście: 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

Także: stli

type and plot

Wejście: boolean
Wyjście: 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

Także: sts

type and plot

Wejście: size (number)
Wyjście: none

Sets the size (in turtle units) of the font used by typeset and inscribe. See typeset

settypesize 10

settypewidth

Także: stw

type and plot

Wejście: ratio
Wyjście: none

Stetches text rendered using typeset or inscribe by the specified ratio.

settypewidth 2

showplot

type and plot

Wejście: plotname (word)
Wyjście: 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

type and plot

Wejście: word or [list]
Wyjście: 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

type and plot

Wejście: none
Wyjście: depth (number)

Returns the current depth of text rendered using typeset. See typeset

show typedepth

typefont

type and plot

Wejście: none
Wyjście: font (number)

Returns the index of the font used by typeset. See typeset

show typefont

typefonts

type and plot

Wejście: none
Wyjście: fonts (list)

Returns a selection of web fonts that can be used by typeset. See typeset

show typefonts

typesize

type and plot

Wejście: none
Wyjście: size (number)

Returns the size of the text rendered by typeset. See typeset.

show typesize

typewidth

type and plot

Wejście: none
Wyjście: size (number)

Returns the ratio by which text rendered by typeset will be stretched. See typeset.

show typewidth

unplot

type and plot

Wejście: co-ordinates [list]
Wyjście: 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

type and plot

Wejście: none
Wyjście: word

Returns the current typeface (font) being used for text output.

print typeface