Nonflavored Prescription Medicine
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

hypotrochoid

0.0.1 • Public • Published

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

Keywords

none

install

npm i hypotrochoid

Downloadsweekly downloads

2

version

0.0.1

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar