9. Generative Art Tutorial for Beginners- Rotating objects in a circle in Processing

preview_player
Показать описание
In this video, we will learn about the polar coordinate system and use it to rotate an object in a circular path
For the whole playlist...
Рекомендации по теме
Комментарии
Автор

i want the circle move and increase and decrease the distant from the center

AkashaHabladoraJa
Автор

I Wrote this but it doesn't work
float r=100;
float angle=0;
float line=10;
void setup(){
size (800, 800);
}
void draw (){
background(255);
translate(width/2, height/2);
fill(50, 50, 50);
float x=r*cos(angle);
float y=r*sin(angle);
line(0, 0, x, y);
ellipse(x, y, 100, 100);
angle=angle+0.1;
r=r+2;
if (r==120){
r=r-2;
}
}

my idea was to tell processing if R is equal 200 then start to decrease the radius.

AkashaHabladoraJa