Back to Table of Contents

Creating Points and Edges

        Although this program is not effective at rendering two-dimensional objects as easily as programs like Geometer's Sketchpad, it has the capability. Fixed points can be added to a 2D graph by typing in their coordinates, while a series of edges can be made by inputting an ordered set of points. Clicking on the demonstration button below opens three windows: a control panel, a 2D graph, and a 3D graph.



The 2D graph window contains an fixed image of K4, the complete graph of four points in the plane with all possible edges drawn. The points are labeled A, B, C, and D, and if you look in the control panel, you will see that these four points have been defined in terms of their Cartesian coordinates. In the 2D graph window, labeled "K4", select Plot from the menu bar to see what plots are being graphed in the window. The four points A, B, C, and D should come up as well as a plot called K4, which refers to the six red segments connecting the points. As far as interaction goes, the graph itself can only be translated and zoomed. The points are fixed at the coordinates that are typed into the control panel, although you are free to change these coordinates at any time. For example, try changing the the coordinates of point D from (0,0) to (0,2). If point D goes off the screen you may either resize the window, zoom out, or translate the object.

We can now attempt to reconstruct this demonstration from scratch. With the demo loaded, go to the control panel window, click on Demo in the menu bar and select the option New Demo. This should leave you with a blank control panel. Suppose we want to draw a pentagon this time. We need to define the five vertices of the pentagon in the control panel. First go to Controls from the menu bar and then select Add New Expression. This brings up a new window in which you must input a sentence of the form "name = definition", where "name" refers to the name of the point and "definition" refers to the Cartesian coordinates of the point. For example, you may write A = (sin(0),cos(0)). Define the other four points in the same way. To create a regular pentagon use:

B = (sin(2*pi/5),cos(2*pi/5))
C = (sin(4*pi/5),cos(4*pi/5))
D = (sin(6*pi/5),cos(6*pi/5))
E = (sin(8*pi/5),cos(8*pi/5))

Notice that the "*" symbol is needed whenever multiplication is used. Next, go to Controls in the menu bar and select New 2D Graph. This will create a new 2D graph window containing only x- and y-axes. In the 2D graph window select Plot: Add Plot: Point. In the new window where it says "Enter a point", type in the name of one of the points defined in the control panel - A, for example. Then click on OK in the bottom right corner of the window.

The 3D window contains a polyhedron known as a dodecahedron which has 20 vertices, 30 edges, and 12 faces. Again, the vertices of a polyhedron should be defined individually in the control panel. You will notice that none of the points for the dodecahedron appear in the control panel. This is because they have been hidden. Items that appear in the control panel can be hidden from view of the user by selecting Controls from the menu bar and then clicking on Show/Hide Items....




Next Section