Method: Processing::GraphicsContext#bezierPoint

Defined in:
lib/processing/graphics_context.rb

#bezierPoint(a, b, c, d, t) ⇒ Numeric

Evaluates the Bezier at point t for points a, b, c, d.



3014
3015
3016
3017
3018
3019
3020
# File 'lib/processing/graphics_context.rb', line 3014

def bezierPoint(a, b, c, d, t)
  tt = 1.0 - t
  tt ** 3.0 * a +
  tt ** 2.0 * b * 3.0 * t +
  t  ** 2.0 * c * 3.0 * tt +
  t  ** 3.0 * d
end