Created
May 5, 2016 15:51
-
-
Save fiskurgit/5471caec047086e99f92829fe26abeb8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| int radius = 200; | |
| float lastX = 0; | |
| float lastY = 0; | |
| void setup(){ | |
| size(600, 600); | |
| noLoop(); | |
| noSmooth(); | |
| } | |
| void draw(){ | |
| background(0); | |
| stroke(255); | |
| translate(width/2, height/2); | |
| for(float angle = 0 ; angle < 125.7 ; angle += 0.1 ){ | |
| float x = radius * sin(angle); | |
| float y = radius * cos(angle) * sin(angle * 0.95); | |
| line(lastX, lastY, x, y); | |
| lastX = x; | |
| lastY = y; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment