arc-length
v1.0.2
Published
Compute the arc-length of an n-dimensional parameterized curve
Readme
arc-length

Compute the arc length of an n-dimensional curve using Romberg integration
Introduction
This module computes the arc length of a parameterized n-dimensional curve using adaptive Romberg integration.
Example
To compute the circumference of a circle:
var arcLength = require('arc-length')
arcLength([Math.cos, Math.sin], 0, Math.PI * 2)
//=> 6.283185307178426Installation
$ npm install arc-lengthAPI
require('arc-length')(y, start, end[, tol=1e-8 [, mindepth=2, maxdepth=10]]])
Arguments:
y: AnArrayof functions of a single parameter which define the curve.start: The lower bound of integration.end: The upper bound of integration.tol(optional, default: 1e-8): The relative error tolerancemindepth(optional, default: 2): The minimum recursion depth for adaptive integrationmaxdepth(optional, default: 10): The maximum recursion depth for adaptive integration
Returns: Returns the scalar arc length
License
© 2016 Ricky Reusser. MIT License.
