Implementation
@override
List<PathPoint> get points {
List<PathPoint> _starPoints = <PathPoint>[
StraightPathPoint.fromTranslation(Vec2D.fromValues(0.0, -radiusY))
];
double angle = -pi / 2.0;
double inc = (pi * 2.0) / sides;
Vec2D sx = Vec2D.fromValues(radiusX, radiusX * _innerRadius);
Vec2D sy = Vec2D.fromValues(radiusY, radiusY * _innerRadius);
for (int i = 0; i < sides; i++) {
_starPoints.add(StraightPathPoint.fromTranslation(
Vec2D.fromValues(cos(angle) * sx[i % 2], sin(angle) * sy[i % 2])));
angle += inc;
}
return _starPoints;
}