SVG Image of Triangulation
is a C program which
creates an SVG image of a triangulation, which can be displayed
by an web browser.
TRIANGULATION_SVG reads one file listing the nodes, and
a second file consisting of groups of 3, 4 or 6 nodes that make up
where 'prefix' is the common prefix for the node and element files,
and will also be used to name the output file:
'prefix'_nodes.txt, the node coordinates.
'prefix'_elements.txt, the triangulation
'prefix'.svg, the plot file
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
TRIANGULATION_SVG is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
a C library which
uses Scalable Vector Graphics (SVG) to plot a triangle and
any number of points, to illustrate quadrature rules and
a C library which
carries out various operations on order 3 ("linear") or order 6
a C program which
reads files describing a set of nodes, their triangulation, and the
value of one or more quantities at each node, and outputs a file
that averages the quantities for each element. This operation
in effect creates an "order1" finite element model of the data.
Scalable Vector Graphics 1.1 (Second Edition),
16 August 2011,
Examples and Tests:
LAKE is a lake region.
List of Routines:
MAIN is the main program for TRIANGULATION_SVG.
CH_CAP capitalizes a single character.
CH_EQI is TRUE (1) if two characters are equal, disregarding case.
CH_TO_DIGIT returns the integer value of a base 10 digit.
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.
I4_MAX returns the maximum of two I4's.
I4_MIN returns the smaller of two I4's.
I4_MODP returns the nonnegative remainder of I4 division.
I4_WRAP forces an I4 to lie between given limits by wrapping.
I4MAT_DATA_READ reads the data from an I4MAT file.
I4MAT_HEADER_READ reads the header from an I4MAT file.
I4MAT_TRANSPOSE_PRINT_SOME prints some of an I4MAT, transposed.
MESH_BASE_ZERO ensures that the element definition is zero-based.
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_NINT returns the nearest integer to an R8.
R8MAT_DATA_READ reads the data from an R8MAT file.
R8MAT_HEADER_READ reads the header from an R8MAT file.
R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed.
S_BLANK_DELETE removes blanks and left justifies the remainder.
S_LEN_TRIM returns the length of a string to the last nonblank.
S_TO_I4 reads an I4 from a string.
S_TO_I4VEC reads an I4VEC from a string.
S_TO_R8 reads an R8 value from a string.
S_TO_R8VEC reads an R8VEC from a string.
S_WORD_COUNT counts the number of "words" in a string.
TIMESTAMP prints the current YMDHMS date as a time stamp.
TRIANGULATION_PLOT plots a triangulation in SVG format.
You can go up one level to
the C source codes.
Last revised on 07 April 2014.