TETRAHEDRON_PROPERTIES
Compute Properties of a Tetrahedron
TETRAHEDRON_PROPERTIES
is a FORTRAN90 program which
computes properties including the centroid,
circumsphere, dihedral angles, edge lengths, face angles, face areas,
insphere, quality, solid angles, and volume
of a tetrahedron in 3D.
Usage:
tetrahedron_properties filename
where filename contains the vertex coordinates.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
TETRAHEDRON_PROPERTIES is available in
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
GEOMETRY,
a FORTRAN90 library which
performs geometric calculations in 2, 3 and N dimensional space.
HYPERSPHERE_PROPERTIES,
a FORTRAN90 library which
carries out various operations for an Mdimensional hypersphere, including
converting between Cartesian and spherical coordinates,
stereographic projection, sampling the surface of the sphere, and
computing the surface area and volume.
POLYGON_PROPERTIES,
a FORTRAN90 library which
computes properties of an arbitrary polygon in the plane, defined
by a sequence of vertices, including interior angles, area, centroid,
containment of a point, convexity, diameter, distance to a point,
inradius, lattice area, nearest point in set, outradius, uniform sampling.
TET_MESH_VOLUMES,
a FORTRAN90 program which
computes the volume of each tetrahedron in a tet mesh;
TETRAHEDRONS,
a dataset directory which
contains examples of tetrahedrons;
TRIANGLE_PROPERTIES,
a FORTRAN90 program which
computes properties of a triangle
whose vertex coordinates are read from a file.
Source Code:
Examples and Tests:

tet_cap.txt,
a "cap" tetrahedron.

tet_cap_output.txt,
the output file.

tet_equilateral.txt,
an equilateral tetrahedron.

tet_equilateral_output.txt,
the output file.

tet_needle.txt,
a "needle" tetrahedron.

tet_needle_output.txt,
the output file.

tet_right.txt,
a right tetrahedron.

tet_right_output.txt,
the output file.

tet_sliver.txt,
a "sliver" tetrahedron.

tet_sliver_output.txt,
the output file.

tet_spindle.txt,
a "spindle" tetrahedron.

tet_spindle_output.txt,
the output file.

tet_wedge.txt,
a "wedge" tetrahedron.

tet_wedge_output.txt,
the output file.
List of Routines:

MAIN is the main program for TETRAHEDRON_PROPERTIES.

ARC_COSINE computes the arc cosine function, with argument truncation.

CH_CAP capitalizes a single character.

CH_EQI is a case insensitive comparison of two characters for equality.

CH_TO_DIGIT returns the integer value of a base 10 digit.

DTABLE_DATA_READ reads data from a DTABLE file.

DTABLE_HEADER_READ reads the header from a DTABLE file.

FILE_COLUMN_COUNT counts the number of columns in the first line of a file.

FILE_ROW_COUNT counts the number of row records in a file.

GET_UNIT returns a free FORTRAN unit number.

R8_SWAP swaps two R8's.

R8MAT_DET_4D computes the determinant of a 4 by 4 matrix.

R8MAT_SOLVE uses GaussJordan elimination to solve an N by N linear system.

R8MAT_TRANSPOSE_PRINT prints an R8MAT, transposed.

R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed.

R8VEC_ANGLE_3D computes the angle between two vectors in 3D.

R8VEC_CROSS_3D computes the cross product of two vectors in 3D.

R8VEC_LENGTH returns the Euclidean length of a vector.

R8VEC_PRINT prints an R8VEC.

S_TO_R8 reads an R8 from a string.

S_TO_R8VEC reads an R8VEC from a string.

S_WORD_COUNT counts the number of "words" in a string.

TETRAHEDRON_CENTROID_3D computes the centroid of a tetrahedron in 3D.

TETRAHEDRON_CIRCUMSPHERE_3D computes the circumsphere of a tetrahedron in 3D.

TETRAHEDRON_DIHEDRAL_ANGLES_3D computes dihedral angles of a tetrahedron.

TETRAHEDRON_EDGE_LENGTH_3D returns edge lengths of a tetrahedron in 3D.

TETRAHEDRON_FACE_ANGLES_3D returns the 12 face angles of a tetrahedron 3D.

TETRAHEDRON_FACE_AREAS_3D returns the 4 face areas of a tetrahedron 3D.

TETRAHEDRON_INSPHERE_3D finds the insphere of a tetrahedron in 3D.

TETRAHEDRON_QUALITY1_3D: "quality" of a tetrahedron in 3D.

TETRAHEDRON_QUALITY2_3D: "quality" of a tetrahedron in 3D.

TETRAHEDRON_QUALITY3_3D computes the mean ratio of a tetrahedron.

TETRAHEDRON_QUALITY4_3D computes the minimum solid angle of a tetrahedron.

TETRAHEDRON_SOLID_ANGLES_3D computes solid angles of a tetrahedron.

TETRAHEDRON_VOLUME_3D computes the volume of a tetrahedron in 3D.

TIMESTAMP prints the current YMDHMS date as a time stamp.

TRIANGLE_ANGLES_3D computes the angles of a triangle in 3D.

TRIANGLE_AREA_3D computes the area of a triangle in 3D.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 08 July 2009.