node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »

superformula

makeDrawing

Makes a drawing for you! Promise-based!

Usage

Pass it a frequency and amplitude -- 100 and 100 is a good place to start -- and it returns the file path of a new drawing.

const makeDrawing = require('makeDrawing')
 
for (var i = 10; i < 100; i += 10) {
  makeDrawing(i, i)
  .then(function(filePath) {
    console.log('Finished making the drawing:', filePath);
  })
}