Can someone help explain this to me?

void draw(){
 stroke(8,65,92); 
 float steps29 = 1026.4 ;
 int distance29 = 670 ;
 int floors = 48;
 float pointAngle = 360.0/floors;
 int radius = 670;
strokeWeight(1.5);
for (float angle = 0; angle < 360.0; angle = angle+pointAngle) { 
   float x = cos(radians(angle)) * radius; 
   float y = sin(radians(angle)) * radius;
   line(x + distance29, y + steps29, 0 + steps29 , 0 + distance29); 
 }

hi, where you find that?

first you need to learn how to post code here at the forum,
-a- it should be running ( complete ) code what can be copy pasted to PDE

-b- it should be formatted, in PDE using [ctrl][t]
here using the </> Preformatted text button from the forum editor


for a beginner also use short examples from
https://processing.org/reference/
or examples or tutorials
not like that.


i rewrite it to a ?similar? but readable and functional code

int floors = 60;
float pointAngle = 360.0/floors;
float x, y,radius = 100, off = 0;  // later play with different off settings

void setup() {
  size(300, 300);
  stroke(0, 0, 100);
  strokeWeight(2);
}

void draw() {
  background(200, 200, 0);
  translate(width/2, height/2);
  for (float angle = 0; angle < 360.0; angle += pointAngle) {
    x = cos(radians(angle)) * radius;
    y = sin(radians(angle)) * radius;
    line(x/2, y/2+off, x+off, y);
  }
}


now you try again to understand

2 Likes