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

Syntax

contours(path)

Description

Returns the contours in the given path, as a list of paths. The path can be anything returned from endpath() to textpath() to line(). A path is basically made up of segments: two points and the curve in between. A group of segments that has a beginning and an ending, or is closed, is a contour. Character glyphs are a composite of contours (for example: the inner and outer oval of the character "o" are two contours.

Example

bezier = ximport("bezier")
 
nofill()
stroke(random(0.5))
 
p = textpath("contours", 10, 100)
for path in bezier.contours(p):
  drawpath(path)
  stroke(random(0.5))