The Vecttools distribution contains a number of interesting utilities for dealing with polygons in the Geomview VECT file format using the plCurve library. The library is written in ANSI C and should compile in any reasonable environment. It uses the GNU Autotools to configure and install in the usual way. Some of the tools available in the current version of the library are
- tube. A general-purpose program for drawing variable-radius triangulated tubes around space polygons. The tubes are output as Geomview OFF files.
- libktcurve. A library for generating space polygons from user-supplied curvature and torsion functions.
- joinvect. Code for joining several space polygons together. Can find the join order which adds the least length to the resulting closed polygon.
- splitvect. Splits a polygon with several components into several files, each containing one component. Can also split single components by deleting edges longer than a certain length.
- splinevect. Change the number of vertices in a polyline, either using standard cubic splines or an experimental splining algorithm designed to preserve a measure of the curvature of the polygon.
- constrainvect. Add, display, or remove point, line, or plane constraints from regions of a polyline. These are designed to be used with ridgerunner.
- knottype Compute the HOMFLY polynomial of a VECT curve (and optionally, compare it to a list of polynomials for low-crossing knots and attempt to classify the curve using the polynomial).
As usual, you can get the latest from the subversion repository at https://jasoncantarella.com/vecttools. Alternately,