We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4cc57d commit a4aef5cCopy full SHA for a4aef5c
fermat_spiral/fermat_spiral.pde
@@ -0,0 +1,29 @@
1
+import processing.svg.*;
2
+
3
+int _numPoints = 450;
4
+float _angle = 137.5;
5
+float _scale = 10;
6
+float _seedSize = 10;
7
8
9
+void setup() {
10
+ size(750, 500);
11
+ strokeWeight(1);
12
+ stroke(0);
13
+ noFill();
14
+ background(255);
15
+}
16
17
+void draw() {
18
+ for(int n=0; n<_numPoints; n++) {
19
+ float theta = n * radians(_angle);
20
+ float radius = sqrt(n) * _scale;
21
+ float x = radius * cos(theta) + width/2;
22
+ float y = radius * sin(theta) + height/2;
23
24
+ float size = (n / 60) + _seedSize * 1.5;
25
+ //float size = _seedSize;
26
27
+ ellipse(x, y, size, size);
28
+ }
29
0 commit comments