g.js — graphical objects for JavaScript

pointOnPathpointOnPath

Calculate a point along the path.

var path = g.ellipse({x: 0, y: 0}, 100, 100);
g.pointOnPath(path, 0.5);

Parameters

  • shape: The input shape.
  • t: The relative position on the shape [0 - 1].

See Also