TETRAHEDRON_SLICE_ANIMATE Animated Tetrahedron/Plane Intersection

TETRAHEDRON_SLICE_ANIMATE, a MATLAB program which displays the intersection of a tetrahedron with a sequence of equally spaced planes that share a common normal vector.

The intersection of a plane and a tetrahedron is a convex planar polygon which is bounded by 0 to 4 points. The possibilities are:

• 0) empty (no intersection);
• 1) a single point;
• 2) a single line segment;
• 3) a triangle;

Given a tetrahedron and a normal vector, the program displays a wireframe image of the tetrahedron, and the points of intersection, and the convex intersection polygon, between the tetrahedron and each of a sequence of equally spaced planes that share the normal vector.

The user defines the tetrahedron by giving a 3x4 vertex array T containing the XYZ coordinates of the vertices.

The user defines the planes by specifying a vector NORMAL which defines the direction normal to the planes.

The program includes an internal switch create_frames which, if set to 1, results in each image being stored in a JPG file, so that a movie file can be created.

Usage:

tetrahedron_slice_animate ( normal, t, n )
where
• normal is the normal vector to the plane;
• t contains the coordinates of the vertices.
• n is the number of equally spaced planes to compute.

Languages:

TETRAHEDRON_SLICE_ANIMATE is available in a MATLAB version.

Related Data and Programs:

GEOMETRY, a MATLAB library which performs geometric calculations in 2, 3 and N dimensional space.

TETRAHEDRON_PROPERTIES, a MATLAB program which computes properties of a tetrahedron whose vertex coordinates are read from a file.

TETRAHEDRON_SLICE_DISPLAY, a MATLAB program which determines the intersection between a tetrahedron and a plane and displays the result.

TETRAHEDRONS, a dataset directory which contains examples of tetrahedrons;

Examples and Tests:

A sequence of 20 frames was created.

SLICE.MOV is an animation created from the JPG files by QUICKTIME.

Last revised on 26 June 2010.