//Advance way
smooth();
noStroke();
fill(0);
int center=25;
int xcircle = center;
int ycircle = center;
int radius = 50;
for( int i = radius; i>0; i=i-5){
xcircle = center;
ycircle = center;
radius = i;
fill(radius);
ellipse(xcircle,ycircle,radius,radius); )
vs
//Not so advance way
smooth();
noStroke();
fill(0);
ellipse(25,25,50,50);
ellipse(25,25,45,45);
ellipse(25,25,40,40);
ellipse(25,25,35,35);
ellipse(25,25,30,30);
ellipse(25,25,25,25);
ellipse(25,25,20,20);
ellipse(25,25,15,15);
ellipse(25,25,10,10);
ellipse(25,25,5,5);
It took me a whole morning to figure out how to use variable and loop in Processing. It had been very frustrating at the start but then thanks to the tutorial slides in the R drive and some of the tutorial video uploaded on Youtube, I started to figure out a little bit about these stuff. Still confusing and cannot apply to all the situation though.
To the tutors: If you happen to see this post, please correct the "advance way" code if i was wrong. And please tell me which parts are unnecessary. Thanks in advance.
No comments:
Post a Comment