................ SHORT DOC .............................................
CYL: Minimal radius enclosing cylinder calculation.
Minimal radius circumscribed cylinders to 3 or 4 points.
Circumscribed cylinders to 5 points.
Reference:
M. Petitjean,
About the Algebraic Solutions of Smallest Enclosing Cylinders Problems
Applic. Alg. Eng. Comm. Comput., 2012, 23[3-4], 151-164
DOI 10.1007/s00200-012-0171-y, arXiv 1008.5259
mailto: petitjean.chiral@gmail.com
CYL computes the minimal radius cylinder enclosing N points
(the convex hull computation is included).
When N=3 or N=4, CYL optionnally computes the minimal radius
circumscribed cylinders.
When N=5, CYL optionnally computes the circumscribed cylinders,
if existing.
CYL reads first the input file name.
Data sets are concatenated in the input file,
according to the following format:
For each dataset:
First line: 4 values can be entered:
1. The number of points N (mandatory).
2. Repeating N on the first line indicates that the coordinates
of the points are to be rewritten in the output file.
The coordinates are not written when 0 is entered.
3. Repeating again the value of N on the first line indicates
that smallest circumscribed cylinders are seeked rather
than the smallest enclosing cylinder.
/* That works only for N=3, or N=4, or N=5 */
When N=3 and N=4, only minimal radii circumscribed cylinders
are considered.
4. The fourth value is the standard deviation of the isotropic
normal law to perturbate each of the N coordinates.
N next lines: cartesian coordinates x, y, z
(allowed separators: space, comma, semi-colon, slash)
Examples of input datasets:
(no vertical alignment of the data is required):
4 0 0 0
1 1 1
1 -1 -1
-1 1 -1
-1 -1 1
4 4 4 1.d-10
1 1 1
1 -1 -1
-1 1 -1
-1 -1 1
Output: the axis, center, radius, and half-height of the cylinder,
then the cylinder contact points (from 3 to 5), and
the 2 side contact points.
If N was entered twice on the first input line preceding
the dataset, the list of the distances from each point to
the axis and to the boundary of the cylinder are listed.
The distance to the boundary of the cylinder being computed
by difference (cylinder radius minus distance from the point
to the axis), rounding errors may give slighly negative values.
The ouput above is repeated if serveral cylinders are computed.
Remarks:
Since the 1 Nov 2012, version CYL.1 has replaced version CYL.0 in which
there was a bug in the enumeration of the cylinders.
The version CYL.1 is still an experimental one, and as such, cannot
guarantee in all cases the optimality of the results.
E.g., the minimizer can miss the global minimum due to repeated
convergence failures.
This kind of event happens generally when the set contains some
badly shaped tetrahedra.
Convergence failures are mentioned in the output.
In this situation it is adviced to put the set at several places
in the input file.
Any feedback is welcome, both about the theory and the software.
Those users who access to other cylinders computations softwares
are welcome to send data or results for comparison.
Many thanks.
................ END SHORT DOC .........................................