pt2string - format a point cloud using a given pattern
pt2string [-H STRING|--header STRING] [-F STRING|--footer STRING] [-S INT|--shift INT] [-?|-h|--help] PATTERN
pt2string converts a point cloud to a new format described by a given PATTERN. For each point of the cloud, a string derived from PATTERN is output, in which all occurrences of 'x1', 'x2', 'x3' are replaced by their values, all occurrences of 'ref' are replaced by the reference number of the point (possibly shifted by option --shift) and all occurrences of 'npts' are replaced by the total number of points in the cloud. The point cloud is read from the standard input and the results are sent to the standard output. By default, the number of points 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 'pt2string -H Example of patterns: 'sqrt(x1^2+x2^3+x3^2)' or '<point><x>x1</x><y>x2</y><z>x3</z></point>'. The program can be used in conjunction with octave to prepare scalar files which can be used for visualisation (view_pt(1), view_tri(1)) or selection (select_pt(1), 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 'npts', its occurrences are replaced by the number of points.
footer output after the point processing. Example: '</table>'. By default, not footer is output. If the patterns contains 'npts', its occurrences are replaced by the number of points.
if 'ref' is used, its value may be shifted by a given integer using this option.
Written by Pierre Smars (first version: 2015)
Reports of bugs or problems should be submitted via electronic mail to <smars@yuntech.edu.tw>.
Copyright (C) 2015-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_pt(1), select_pt(1), select_tri(1)