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.split()

Syntax

split(path, t)

Description

Returns a new path with an extra point at t. Splits the path at t, which is a number between 0.0 and 1.0 and indicates the time on the path. A value of 0.5 would mean halfway down the path.

Example

bezier = ximport("bezier")
nofill()
autoclosepath(False)
 
beginpath(100, 500)
curveto(200,250, 600,600, 400,300)
path = endpath(draw=False)
 
stroke(0.5)
path = bezier.split(path, 0.25)
drawpath(path)
 
stroke(0.2)
for point in path:
    oval(point.x-4, point.y-4, 8, 8)