hypotrochoid

Returns points across one or more hypotrochoids

npm install hypotrochoid
3 downloads in the last week
6 downloads in the last month

hypotrochoid

Returns points across one or more hypotrochoids for varying values of t.

Trivia: you can trace out curves like this using a spirograph, yielding similar results to Guilloché machines - which were used to create intricate patterns resistant to counterfeiting.

check out the demo

Installation

npm install hypotrochoid

Usage

hypotrochoid(distance, radii, t, [result])

  • distance is the distance of each point from the interior circle(s).
  • radii is an array of circle radii - use two elements for a simple hypotrochoid. Three or more will sum the results for each adjacent pair of elements.
  • t the point across the curve.
  • result is an array you can use to output the X/Y position to - otherwise, a new array will be created and returned.

Hypotrochoid

npm loves you