sample method
- int count
Sample count evenly-spaced points along the entire spline.
Implementation
List<Point> sample(int count) {
if (count <= 1) return [controlPoints.first];
final points = <Point>[];
final maxT = segmentCount.toDouble();
for (var i = 0; i < count; i++) {
final t = maxT * i / (count - 1);
points.add(pointAt(t));
}
return points;
}