SPath.spiral constructor
SPath.spiral({})
A spiral shape made up of lines
Implementation
SPath.spiral(
{required Point<double> at,
required int n,
required double l,
startAngle = 0,
double rate = 20}) {
var a = startAngle;
var r = l;
currentPoint = at + Point(r * cos(a), r * sin(a));
for (var i = 0; i < n; i++) {
final dA = 2 * asin(l / (r * 2));
r += rate * dA;
a += dA;
line(to: at + Point(r * cos(a), r * sin(a)));
}
}