Graphic

Help Contents Graphics Drawing filled shapes Graphic
SurfaceEnd GraphicStart

Graphic commandlist


outputs a new Graphic, that can be assigned to a variable, and later be drawn by drawGraphic. All the graphic commands written to the screen performed by commandlist are recorded to it.

It is recommended to use the primitive Graphic instead of GraphicStart..GraphicEnd, because so you cannot forget GraphicEnd, when i.e. leaving a loop with break, or leaving a procedure with output or stop.

Example:

clearScreen
perspective
enableCylinderLines
setPenSize 3
setPenColor "blue
gr=Graphic [rbox]
repeat 50 [drawGraphic gr down 90 forward 20 rightroll 2 up 90]
rotatescene2

Examples:

References:

SurfaceEnd GraphicStart