interp.getPoints(10)// using default values gives a list of points as arrays and along the full curve (position 0 to 1)
interp.getPoints(10,lib.Point,0.25,0.75)// here we pass in a type for the return type that implements VectorType and also give it a range
interp.getTangentAt(0.25)
interp.getNormalAt(0.25)
interp.getDerivativeAt(0.25)
interp.getSecondDerivativeAt(0.25)
interp.getCurvatureAt(0.25)
interp.getNearestPosition([2,5])
interp.getBoundingBox()
interp.getIntersects(-10,0)
interp.getTimeFromPosition(0.25)
interp.getPositionFromTime(0.25)
interp.getPositionFromLength(50)// the position at 50 units
interp.length
interp.getLengthAt(0.25)// quarter of the total curve length
interp.getPositionAtKnot(2)
lib=require('curve-interpolator@3.3.0')
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.