tri2string - format a triangle cloud using a given pattern
tri2string [-H STRING|--header STRING] [-F STRING|--footer STRING] [-S INT|--shift INT] [-Sp INT|--shift-point INT] [-?|-h|--help] PATTERN
tri2string converts a triangle cloud to a new format described by a given PATTERN. For each triangle of the cloud, a string derived from PATTERN is output, in which all occurrences of 'x1', 'x2', 'x3' are replaced by the coordinates of the first, second and third point, all occurrences of 'p1', 'p2' and 'p3' are replaced by the reference number of the point (possibly shifted by option --shift-point) and all occurrences of 'ref' are replaced by the triangle reference number (possibly shifted by option --shift). The triangle cloud is read from the standard input and the results are sent to the standard output. By default, the number of triangles is output to the first line. Options --header and --footer can be used to add headers and footers to the output. To have no header, the option should be 'tri2string -H '' PATTERN'. Example of patterns: '(x1+x2+x3)/3.' or '<triangle>p1,p2,p3</triangle>'. The program can be used in conjunction with octave to prepare scalar files which can be used for visualisation (view_tri(1)) or selection (select_tri(1)).
Returns the manual page
header to output before the point processing. Example: '<table>'. By default, the header is the number of points in the cloud. If the string is empty '', no header is output. If the patterns contains 'ntris' or 'npts', their occurrences are replaced by the number of triangles and/ord the number of points.
footer output after the point processing. Example: '</table>'. By default, not footer is output. If the patterns contains 'ntris' or 'npts', their occurrences are replaced by the number of triangles and/ord the number of points.
if 'ref' is used, its value are shifted by a given integer using this option.
if 'p1', 'p2' and/or 'p3' are used, their values are shifted by a given integer using this option.
Written by Pierre Smars (first version: 2016)
Reports of bugs or problems should be submitted via electronic mail to <smars@yuntech.edu.tw>.
Copyright (C) 2016-2021 Pierre Smars. License GPLv2 <http://www.gnu.org/licenses/gpl-2.0.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
view_tri(1), select_tri(1)