Using G & G with Polyhedra

Last update=16 May, 2006


Polyhedron Window

Above is a typical polyhedron window containing a 3D polyhedron. The vertices and edges of a polyhedron form a planar graph, called the skeleton of the polyhedron. The window shows the number of vertices, edges, and faces of a polyhedron. A polyhedron is convex if, given any two points P,Q, within the polyhedron, all points of the line segment PQ are also contained in the polyhedron. G&G prefers convex polyhedra, but can sometimes also draw non-convex polyhedra.

The coordinates of the vertices are stored as floating point triples (x,y,z). The x and y axes meet in the centre of the window, and the z-axis points straight out of the screen. The "origin" of the polyhedron is its centre -- the average of the coordinates of its vertices. A polyhedron window is always interpreted to represent the region of space slightly larger than the unit cube. The "scale factor" shown in the window is the factor by which the coordinates have been multiplied in the current display of the polyhedron. The polyhedron is viewed from a point on the z-axis, looking towards the origin. Currently the view point is restricted to be on the z-axis, but can be moved closer or further from the polyhedron. The light source is also located at the view point.


Polyhedron Functions Available in G&G 3.2

Rotate Polyhedron

A polyhedron can be rotated by using the numeric keypad. The numbers 0..9 cause the polyhedron to be rotated by 5 degrees. If the shift key is pressed, the rotation is by 1/2 degree.

Zoom Polyhedron

Use the up/down arrow keys to zoom a polyhedron. This changes the scale factor shown in the window.

Move View Point

The view point for a polyhderon is initially a point on the z-axis, looking toward the origin. Use the right/left arrow keys to move the view point further away/closer to the origin.

Dual Polyhedron

Construct the dual polyhedron whose vertices correspond to the faces of the original polyhedron.

Truncate Corners

Every vertex of X is truncated -- that is, a plane is intersected with the polyhedron local to each vertex. The result is a new polyhedron.

Convex Hull

Given a set of data points (x_i, y_i, z_i), where i=1,2,...,n, the convex hull is the smallest convex polyhedron containing all the points. Given an input file of data points, G&G will compute the convex hull as a polyhedron. The algorithm used is the 3D Incremental Algorithm.


G&G     Back to the Groups & Graphs home page.