Each class has several construction methods. The eight tables below briefly explain these construction methods.
param="ABC;polygon;triangle;A,B,C" param="ABC;polygon;triangle;AB,C"
2. Those constructions that can only be used in solid geometry are indicated with a dark blue background color.
3. Optional data elements are indicated in the tables by square brackets. In particular, [z] indicates z is an optional integer, and [plane A] indicates A is an optional plane. The optional data elements are only used in solid geometry; they should always be omitted in plane geometry.
3a. When an optional third coordinate [z] is not specified, it is taken to be 0 so that the point lies in the xy-plane, that is, the plane of the screen.
3b. When an optional plane such as [plane A] is not specified, it is assumed to be the xy-plane.
4. Data elements come in three kinds: (1) integers, (2) points, and (3) other elements. These are indicated in separate lines in the tables. As long as the elements of each kind come in the right order, they will be interpreted properly. Elements of different kinds may be listed as you like.
Index to the Geometry Applet ElementsIndex
- Parameters
- Elements
- Colours
- Source Files
- About Points
- About Lines
- About Polygons
- About Circles and Sectors
- About Planes and Spheres
- About Polyhedra
Parameters:
- background - the background color
- font - the font for displaying letters in the figure
- title - the title of the figure, used for a floating frame
- debug - the debugging switch, by default, off
- buffered - whether the graphics are buffered, by default, no
- pivot - the name of a pivot point, if any
- e[i] - an element. The elements are numbered from 1 on up.
IndexElements
The format for an element is a little complicated. Here's the specifcation for a typical element:name=e[1] value="A;point;free;50,50;black;magenta"Each element has a number, a name, an element class, a construction method, and construction data. Optionally colors may be specified. The number of this element is 1, which means that it is the first element to be created. Its name is A. Its class is point. Its construction method is free, which means it can be freely dragged about. Its construction data is 50,50, which means that it will be initially places at pixel coordinates (50,50). When it is displayed, its name A will be colored black, but the dot representing the point will be magenta.Elements come in five different classes: point, line, circle, polygon, and sector. Each of these classes has several construction methods. Most of the construction methods can only use one list of construction data, but some can use alternate lists. These geometric classes and construction methods are described in tables after a short description of colors.
IndexColors
Each element may have up to four colors: first the color of the name of the element; second the color of the 0-dimensional parts (points) of the element; third the color of the 1-dimensional parts (lines or arcs) of the element; and fourth the color of the 2-dimensional parts (if any). The background color and the colors of the elements can be declared in a couple of different ways. A single word specifying the color may be given. These possible colors are * black, * blue, * cyan, * darkGray, * gray, * green, * lightGray, * magenta, * orange, * pink, * red, * white, and * yellow. If the word "random" is specified, then a randomly chosen pastel will be used. If an element is specified as "background", then it will be given the background color; if "brighter", then a brighter version of the background; if "darker", then a darker version of the background; and if "none" then it won't appear.Specific colors may be given by their red, green, and blue components as six hex digits in an rrggbb format.
Alternatively, a color can be given as a triple of decimal numbers separated by commas to indicate hue (0 to 360), saturation (0 to 100), and brightness (0 to 100).
Source files
The Geometry Applet uses a Slate Canvas to put all the Elements on. The slate can be lifted off into a separate window, and that uses ClientFrame, a subclass of Frame. An Element is a generic thing which is subclassed in five different ways to give actual elements that can be displayed. These five classes are further subclassed, tooThe source files for version 1.3.1, the associated class files, and a couple of html files have been zipped into the file Geometry.zip.
- PointElement with subclasses CircleSlider, FreePoint, Intersection, LineSlider, Midpoint, InvertPoint.
- LineElement with subclasses AngleDivider, Bichord, Chord, Foot, Layoff, Perpendicular, Proportion, and MeanProportion.
- CircleElement with subclasses Circumcircle and InvertCircle.
- PolygonElement with subclasses Application, RegularPolygon, and Similar.
- SectorElement with subclass Arc.
David E. Joyce
Department of Mathematics and Computer Science
Clark University
Worcester, MA 01610Email: djoyce@clarku.edu
My nonJava Homepage and my Java homepage