Closing this shape that is using perlin noise.
in
Programming Questions
•
1 year ago
Hello,
Can someone point me in the right direction?
I am close to my desired program, however I would like the shape to close.
Can someone point me in the right direction?
Thanks!
- float radius = 200;
- float z;
- void setup () {
- size(500,400);
- background(255);
- smooth();
- noStroke();
- fill(0);
- }
- void draw () {
- background(255);
- pushMatrix();
- translate(width/2,height/2);
- for (int i = 0; i < 360; i++) {
- float n1 = noise((i)*0.01, z*0.00001)*radius;
- float x = sin(radians(i))*n1;
- float y = cos(radians(i))*n1;
- ellipse(x,y,2,2);
- z++;
- }
- popMatrix();
- }
1