smoothie 0.2.0+1 smoothie: ^0.2.0+1 copied to clipboard
Create and sample a smooth bezier curve going through a given set of points
smoothie #
Create and sample a smooth bezier curve going through a given set of points
Usage #
Let's say you have some arbitrary data (a list of points):
var _originalDataSeries = <Point>[
Point(0, 5),
Point(3, 15),
Point(5, 10),
Point(6, 6),
Point(9, 13),
];
Define a desired number of samples in the resulting curve:
int _sampleCount = 100;
Import smoothie
:
import 'package:smoothie/smoothie.dart';
Create a smooth curve using the getSampledCurveFromPoints
extension function on your original data:
List<Point<num>> _sampledCurve = _originalDataSeries.smooth(_sampleCount);
See oversampling in action: