1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

bezier.findpath()

Syntax

findpath(points, curvature=1.0)

Description

Constructs a smooth path between the given list of points. If the curve has more than three points, the curvature parameter offers some control on how separate segments are stitched together: from straight lines (0.0) to smooth curves (1.0).

Example

bezier = ximport("bezier")
 
p1 = Point(100, 100)
p2 = Point(200, 200)
p3 = Point(350, 200)
 
for p in [p1, p2, p3]:
    oval(p.x-2, p.y-2, 4, 4)
 
autoclosepath(False)    
path = bezier.findpath([p1, p2, p3])
drawpath(path)