-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathespiral
More file actions
46 lines (32 loc) · 845 Bytes
/
espiral
File metadata and controls
46 lines (32 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//https://www.youtube.com/watch?v=KWoJgHFYWxY
int n = 4000;
int c = 3;
float x,a;
float y,b;
void setup(){
background(255);
size(1200,1200, P3D);
noStroke();
ellipseMode(CENTER);
frameRate(200);
}
void draw(){
translate(width/2,height*0.5);
fill(10,random(100),random(255),7);
//rotateX(frameCount); //gira alrededor de eje Y rotateY
//rotateY(frameCount);
rotateZ(frameCount);
for (float i = 0; i < n; i++){
float r = c * i;
x = r * cos(sqrt((72*PI*i)/1200)*(cos(2*PI/1200)));
y = r * sin(sqrt((74*PI*i)/1200)*(sin(2*PI/1200)));
a = r * cos(sqrt((68*PI*i)/1200)*(cos(2*PI/1200)));
b = r * cos(sqrt((70*PI*i)/1200)*(sin(2*PI/1200)));
ellipse(x,y, random(3), random(3));
square(a,b, 5);
}
//void mouseReleased() {
//saveFrame("bw#####.png");
//{
saveFrame("espiral/espi#####.png");
}