CrossSections Help

CrossSections is an interactive program that visualizes polyhedra and their cross-sections with a plane.

The left viewport shows the body with the cut plane. The right viewport shows the cross-section of the body with the plane explicitly. The small red triangle in the corner allows you to make a unique mapping of the two views at any time.

You can manipulate the body as well as the cut plane using the mouse. Please make the desired choice on what to move in the box Manipulation: the body, the cut plane or both at the same time. By pressing the left mouse button, you can rotate, the right mouse buttons changes the distance and moves the cut plane orthogonally to its normal. The button Reset brings you back to the pristine configuration. The arrow buttons rotate some degrees to each direction, depending on what you enter in between the buttons. This serves to make reproducible configurations. All manipulations are applied to the cross-section in real time and displayed accordingly.

You can choose the body to be displayed using the options in box Body. The selection includes six polyhedra. You can also load an external file. The file format is based on XML and documented below. Check out the included sample files!

The program features unfolding the solids to form a lattice. All control elements concerning this topic are contained in the Unfolding box. Using the slide bar, you can determine the level of unfolding; from closed (left) to completely unfolded (right). By using the buttons with the arrows to the left and to the right, you can start and stop animating the unfolding process. Furthermore, you can choose how CrossSections shall generate the lattice; using a breadth-first search or a depth-first search. In general, one cannot rule out overlaps, in particular for non-convex faces.

The buttons in the box Graphics allow you to adjust the level of detail for the display. Would you like isometric or perspective projection? Shall faces, edges, the cut plane and/or the cuts be drawn explicitly? The Cut Unfolded option determines whether the unfolded body is intersected, or rather the cut lines of the closed body are tied to the unfolded faces. The difference is only viewable for a (partly) unfolded polyhedron.

If you have any questions or suggestions for improvement, or if you encounter a problem, please contact me via email. I appreciate any comment on the program or on my website in general :-)

Input File Format

The input file format used by CrossSections is based on XML and has the file extension ".poly". A first impression can be given by the sample files in subfolder Samples and the provided XML schema Polyhedron.xsd.

The file must start with the XML header

<?xml version="1.0" encoding="utf-8"?>

and contain exactly one polyhedron object with a name and a reference to the schema:

<polyhedron name="Example" xmlns=""> </polyhedron>

In turn, this object contains an arbitrary number of vertices, each featuring a three-dimensional coordinate and a unique ID:

<vertex id="5" x="-0.6" y="1.0" z="0.0"/>

The faces of the body follow. Each face has a specified color (valid possibilities), and contains the corner in counter-clockwise order (as seen from the outside). The IDs assigned before must be referenced. Every edge may be used at most once in each direction. For closed bodies, this means exactly once. To make the unfolding sensible, all faces should be connected. Unfolding always starts with the first described face. All faces need to be plain. Otherwise, unforeseeable behavior can occur. The program does not check this fact.

<face color="Red"> <v>2</v> <v>1</v> <v>4</v> </face>

A complete file with only two faces could look like this:

<?xml version="1.0" encoding="utf-8"?>
<polyhedron name="MostSimple" xmlns="">
  <vertex id="0" x="-0.6" y=" 1.0" z=" 0.0"/>
  <vertex id="1" x=" 1.0" y=" 1.0" z=" 0.0"/>
  <vertex id="2" x=" 1.0" y=" 1.0" z=" 1.0"/>
  <vertex id="3" x="-0.6" y=" 1.0" z=" 1.0"/>
  <vertex id="4" x=" 1.5" y="-1.0" z=" 0.5"/>

  <face color="Green">

  <face color="Red">

The body should lie symmetric with respect to the origin, and have a diameter of about 2.0, to ensure a good presentation.

If you construct new bodies, I would be happy if you send me the files for future inclusion with the software package. I am interested in particular in the Archimedian Solids (since the Platonic Solids are already included).

326786 visits since 1999-10-27; Last update 2017-01-12