1tkspline(nT)k Spline - An additional smoothing method for canvas itemstkspline(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       spline, - additional smoothing method for canvas items.
9

SYNOPSIS

11            package require Tkspline
12            ...
13            .c create line ... -smooth spline ...
14            .c create polygon ... -smooth spline ...
15_________________________________________________________________
16

INTRODUCTION

18       The  new  option value: -smooth spline provides an additional smoothing
19       method to line and polygon canvas items.
20
21
22       Spline smoothing will revert to the builtin smoothing method unless the
23       number  of  points  is  3n+1, where n is the number of spline segments.
24       (Normally in polygons this means 3n points because the  last  point  of
25       the  spline is understood to be the same as the first in order to close
26       the polygon).
27
28
29       In line and polygon items,  the  curves  generated  with  the  standard
30       -smooth true option have the following properties:
31
32       -  the  curve  is always tangential to a straight line between consecu‐
33          tive points.
34
35       -  the curve is only guaranteed to intersect the first and last  points
36          of lines.
37
38       -  the curve is not guaranteed to intersect any points of polygons.
39
40
41       With  -smooth  spline  (and the right number of coordinates) the curves
42       generated have the following different properties:
43
44       -  the curve is guaranteed to intersect  the  first  point,  and  every
45          third point after that.
46
47       -  each  segment  of  the curve shares endpoints with the adjacent seg‐
48          ments, but is otherwise independant of them.
49
50       -  the curve is guaranteed to be tangential to a line between n and n+1
51          at point n, and also to a line between n+2 and n+3 at point n+3.
52
53       -  the  curve  is  not guaranteed to be smooth at the junctions between
54          segments unless the shared point and the points either  side  of  it
55          are on a straight line.
56
57
58       These  alternative  properties  are  useful to some path planning algo‐
59       rithms.
60
61

CREDITS

63       The underlying Bezier code is in John Ousterhout's original canvas wid‐
64       get,  this  extension just provides an alternate interface to it.   The
65       hooks into the canvas are provided by Jan Nijtmans in his "dash" patch.
66
67

KEYWORDS

69       spline, line, polygon, bezier, canvas, widget
70
71

AUTHOR

73       John Ellson, ellson@graphviz.org
74
75
76
77Tk                                    8.0                          tkspline(n)
Impressum