TETRAHEDRON_PROPERTIES
Compute Properties of a Tetrahedron
TETRAHEDRON_PROPERTIES
is a C++ 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 C++ library which
performs geometric calculations in 2, 3 and N dimensional space.
HYPERSPHERE_PROPERTIES,
a C++ library which
carries out various operations for an M-dimensional 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 C++ 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.
TETRAHEDRONS,
a dataset directory which
contains examples of tetrahedrons;
TRIANGLE_PROPERTIES,
a C++ 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 true if two characters are equal, disregarding case.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
DTABLE_DATA_READ reads the data from a DTABLE file.
-
DTABLE_HEADER_READ reads the header from a DTABLE file.
-
FILE_COLUMN_COUNT counts the columns in the first line of a file.
-
FILE_ROW_COUNT counts the number of row records in a file.
-
I4_MAX returns the maximum of two I4's.
-
I4_MIN returns the minimum of two I4's.
-
R8_ABS returns the absolute value of an R8.
-
R8_HUGE returns a "huge" R8.
-
R8_MAX returns the maximum of two R8's.
-
R8_MIN returns the minimum of two R8's.
-
R8_SWAP switches two R8's.
-
R8MAT_DET_4D computes the determinant of a 4 by 4 R8MAT.
-
R8MAT_SOLVE uses Gauss-Jordan 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 R8VEC's in 3D.
-
R8VEC_DOT computes the dot product of a pair of R8VEC's in ND.
-
R8VEC_LENGTH returns the Euclidean length of an R8VEC.
-
R8VEC_MAX returns the value of the maximum element in an R8VEC.
-
R8VEC_PRINT prints an R8VEC.
-
R8VEC_ZERO zeroes an R8VEC.
-
S_LEN_TRIM returns the length of a string to the last nonblank.
-
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 C++ source codes.
Last revised on 09 July 2009.