Help Contents / Graphics

Graphics


aUCBLogo provides traditional Logo turtle graphics with one or more turtles. Collision detection is not supported. This is the most hardware-dependent part of Logo; some features may exist on some machines but not others. Nevertheless, the goal has been to make Logo programs as portable as possible, rather than to take fullest advantage of the capabilities of each machine. In particular, Logo attempts to scale the screen so that turtle coordinates [-400 -300] and [400 300] fit on the graphics window, and so that the aspect ratio is 1:1, although some PC screens have nonstandard aspect ratios. 

The center of the graphics window (which may or may not be the entire screen, depending on the machine used) is turtle location [0 0]. Positive X is to the right; positive Y is up. Headings (angles) are measured in degrees clockwise from the positive Y axis. (This differs from the common mathematical convention of measuring angles counterclockwise from the positive X axis.) The turtle is represented as an isoceles triangle; the actual turtle position is at the midpoint of the base (the short side). 

Colors are, of course, hardware-dependent. However, Logo provides partial hardware independence by interpreting color numbers 0 through 7 uniformly on all computers: 

	0  black         1  blue             2  green           3  cyan 
	4  red            5  magenta       6  yellow         7  white 

Where possible, Logo provides additional user-settable colors; how many are available depends on the hardware and operating system environment. If at least 16 colors are available, Logo tries to provide uniform initial settings for the colors 8-15: 

	 8  brown        9  tan            10  forest         11  aqua 
	12  salmon    13  purple        14  orange       15  grey 

Logo begins with a white background and black pen. 

This section contains the following sub-sections:
	Color database
	Relative Turtle Motion
	Absolute Turtle Motion
	Turtle Motion Queries
	Turtle Control
	Window Control
	Turtle and Window Queries
	Multiple Turtles
	Pen and Background Control
	enable and disable flags
	Pen Queries
	Drawing Curves
	Drawing Text
	Drawing filled shapes
	Lighting
	Fog
	Pictures
	Bitmaps
	Direct Graphics
	Projection Matrix
	Texturing
	Shadows

previous: Workspace Management	next: GUI programming
