time-hulls
v0.0.114
Published
Calculates a series of convex hulls for periods of timestamped 2D point data
Downloads
15
Maintainers
Readme
time-hulls
Generates series of convex hulls for periods of timestamped, 2D point data
Install
npm install time-hulls
// or
yarn add time-hulls
Usage
import { TimeHullSeries } from 'time-hulls'
// or
const TimeHullSeries = require("time-hulls").TimeHullSeries
let points = []
for(i=0; i < 300; i++) points.push({ timestamp: i*100, x: Math.random(), y: Math.random() })
let series = new TimeHullSeries({
points: points,
period: 5000,
timestep: 0,
includeIncomplete: true,
})
series.getHulls()
series.getCentroids()