/tclspline/doc/spline.n
Unknown | 47 lines | 46 code | 1 blank | 0 comment | 0 complexity | 4325b17e776ba10c5c31285af0f88d69 MD5 | raw file
Possible License(s): AGPL-3.0
1'\" 2'\" Copyright (c) 1993 The Regents of the University of California. 3'\" Copyright (c) 1994-1996 Sun Microsystems, Inc. 4'\" Copyright (c) 2005 Karl Lehenbauer 5'\" 6'\" See the file "license.terms" for information on usage and redistribution 7'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. 8'\" 9'\" RCS: @(#) $Id: spline.n,v 1.1 2005-11-24 03:55:22 karl Exp $ 10'\" 11'\".so man.macros 12.TH read n 0.0 TclSpline "Spline Extension for Tcl" 13.BS 14'\" Note: do not modify the .SH NAME line immediately below! 15.SH NAME 16spline \- Generate a set of quadratic splines based on an input list 17.SH SYNOPSIS 18\fBspline \fR \fInSteps pointList\fR 19.sp 20\fBspline_raw \fInSteps pointList\fR 21.BE 22 23.SH DESCRIPTION 24.PP 25Input is an integer number of steps, \fInSteps\fR, and a list containing 26three or more pairs of x and y coordinates. \fBspline\fR reads that 27list and generates a new list of x and y coordinate pairs representing 28a curve based on the passed points, rendered as a set of quadratic 29splines: one spline is drawn for the first and second line segments, one 30for the second and third, and so on. 31.PP 32Straight-line segments can be generated within 33a curve by duplicating the end-points of the desired line segment. 34.PP 35\fBspline_raw\fR indicates that the list should also be returned as a 36curve, but the list of coordinates is such that the first coordinate pair 37(and every third coordinate pair thereafter) is a knot point on a cubic 38Bezier curve, and the other coordinates are control points on the cubic 39Bezier curve. 40.PP 41Straight line segments can be generated within a curve by making control 42points equal to their neighboring knot points. If the last point is a 43control point and not a knot point, the point is repeated (one or two 44times) so that it also becomes a knot point. 45.PP 46\fInSteps\fR specifies the degree of smoothness desired for curves: each 47spline will be approximated with \fInSteps\fR line segments.