dist/shape-points.es.js
/**
     * Assign parameter values to digitized points using relative distances between points.
     *
     * @param {Array<Array<Number>>} points - Array of digitized points
     * @returns {Array<Number>} Parameter values
     */
Assign parameter values to digitized points using relative distances between points.

@param {Array>} points - Array of digitized points
@returns {Array} Parameter values
Assign parameter values to digitized points using relative distances between points . @param { Array > } points - Array of digitized points @returns { Array } Parameter values
function chordLengthParameterize(points) {
        var u = [],
            currU,
            prevU,
            prevP;
        points.forEach(function (p, i) {
            currU = i ? prevU + maths.vectorLen(maths.subtract(p, prevP)) : 0;
            u.push(currU);
            prevU = currU;
            prevP = p;
        });
        u = u.map(function (x) {
            return x / prevU;
        });
        return u;
    }
function chordLengthParameterize ( points ) { var u = [ ] , currU , prevU , prevP ; points . forEach ( function ( p , i ) { currU = i ? prevU + maths . vectorLen ( maths . subtract ( p , prevP ) ) : 0 ; u . push ( currU ) ; prevU = currU ; prevP = p ; } ) ; u = u . map ( function ( x ) { return x / prevU ; } ) ; return u ; }
Assign parameter values to digitized points using relative distances between points.
Assign parameter values to digitized points using relative distances between points .