/api.harmonograph.art

👩‍🎨 Draw a harmonograph with a URL

Primary LanguageJavaScriptMIT LicenseMIT

api.harmonograph.art

👩‍🎨 Draw a harmonograph with a URL

Usage

The URL will return an SVG of a randomised harmonograph with a #000 stroke color, 1px stroke width and a size of 700px:

https://api.harmonograph.art/

Randomised lissajous curves

Options

The URL follows this pattern:

api.harmonograph.art/strokeColor/backgroundColor/strokeWidth/size/animationDuration/

Option Description Default value Type
strokeColor The color of the line #000 string
backgroundColor The background color of the svg transparent string
strokeWidth The width of the line 1 number
size The size of the svg 700 number
animationDuration Seconds it takes to draw harmonograph 30 string

https://api.harmonograph.art/3dfcb3/1C65F8/0.5/400/60

Randomised lissajous curves with 0.5 stroke width, 400pixels in size and dark blue background and bright green stroke color

Getting started

To get started locally make sure you have node and npm installed:

npm install && npm run dev

Then you can open https://localhost:3000/ to see the API running locally.

Release History

  • v0.0.0 - 💥 Initial release