Created
April 9, 2020 20:46
-
-
Save divyanshub024/f770354a38017e680ac7ebdf00d0f31f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Path createSpiralPath(Size size) { | |
double radius = 0, angle = 0; | |
Path path = Path(); | |
for (int n = 0; n < 200; n++) { | |
radius += 0.75; | |
angle += (math.pi * 2) / 50; | |
var x = size.width / 2 + radius * math.cos(angle); | |
var y = size.height / 2 + radius * math.sin(angle); | |
path.lineTo(x, y); | |
} | |
return path; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment