Plumbing Graphics objects are displayed on a square canvas of size 600 pixels. The lower left corner of the canvas is located at (-300,-100) and the upper right corner is located at (300,500). The plumber is initially located at (0,0) with orientation 90 degrees.
The remainder of this page is a list of Plumbing Graphics functions.
returns a straight piece of pipe of the specified length (color, and width). The plumber is left at the end of the pipe. This function has two optional arguments which can be used to specify the pipe's color and width. (abbrev. st) Example:
(straight 100)returns a black pipe of length 100 and width 1 and leaves the plumber at its end.
(straight 100 '(255 0 0) 10)returns a red pipe of length 100 and width 10 and leaves the plumber at its end.
returns a transparent piece of pipe of the specified length. (abbrev. tr) Example:
(transparent 100)returns a transparent pipe of length 100 and leaves the plumber at its end.
returns a pipe-bend of the specified angle and changes the orientation of the plumber by the same amount. Positive bend angles are clockwise and negative bend angles are counter-clockwise. (abbrev. be) Example:
(bend 45)returns a 45 degree clockwise pipe-bend and changes the orientation of the plumber by 45 degrees.
takes one or more graphic objects as arguments and joins them together end-to-end to form a single composite graphic-object. (abbrev. adj) Example:
(adjoin (straight 100) (bend 45) (straight 100))joins a straight pipe, a pipe-bend, and a second straight pipe into a single, composite graphic-object.
attaches graphics objects together at their respective origins (i.e., initial plumber positions and orientations) to form a single composite object and then leaves the plumber at this location. (abbrev. ado) Example:
(adorn (adjoin (bend 45) (straight 75)) (adjoin (bend -45) (straight 75)))returns a large "V."
returns a filled circle of the specified diameter (and color). It does not change the location or orientation of the plumber. (abbrev. sp) Example:
(spot 8)returns a spot of size 8.
returns a string of text which is displayed horizontally. It does not change the location or orientation of the plumber. (abbrev. txt) Example:
(text "foo bar")causes "foo bar" to be displayed.
copies the graphic object, replacing all pipes with pipes of the specified color. (abbrev. gcolor) Example:
(graphic-color (adorn (adjoin (bend 45) (straight 75)) (adjoin (bend -45) (straight 75))) '(255 0 0))returns a large red "V."
copies the graphic object, replacing all pipes with pipes scaled by the specified amount. (abbrev. gscale) Example:
(graphic-scale (adorn (adjoin (bend 45) (straight 75)) (adjoin (bend -45) (straight 75))) 2)returns a "V" which is twice as big.
reflects the graphic object about the axis defined by the plumber's initial orientation. This is accomplished by copying the graphic object and replacing all bends with bends of the opposite sign. (abbrev. gmirror) Example:
(adjoin (bend 90) (straight 100))returns a pipe pointing to the right.
(graphic-mirror (adjoin (bend 90) (straight 100)))returns a pipe pointing to the left.
returns the graphic object created by adjoining, in reverse order, the graphic objects which comprise its argument. (abbrev. greverse) Example:
(adjoin (straight 10 '(255 0 0)) (straight 10 '(0 255 0)))returns a red pipe adjoined to a green pipe.
(graphic-reverse (adjoin (straight 10 '(255 0 0)) (straight 10 '(0 255 0))))returns a green pipe adjoined to a red pipe.