We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › another arc() issue
Page Index Toggle Pages: 1
another arc() issue (Read 1010 times)
another arc() issue
May 10th, 2010, 12:10pm
 
Hi,
I have another issue with arc()..
I want to paint 10 or more arcs, but one of them with a bigger stroke size, without losing the proportion to the inner side of the other arcs..

Here is a image to show what I need:
Case 1 is what I try to get.

http://img405.imageshack.us/img405/7157/arcexample.pngUploadedwith

and here is the code:

Code:
size(800,800);
noFill();
strokeCap(SQUARE);
background(255);
translate(width/2,height/2);
rotate(-180);
 for (int i=0; i<13; i++) {
   stroke(0,12,23,125);
   if(i==11){strokeWeight(350);}
 else{strokeWeight(200);}
     arc(0, 0, 350, 350, radians(i*i), radians(i*i+i) );
 }



any help will be much appreciated!
Re: another arc() issue
Reply #1 - May 10th, 2010, 12:55pm
 
You could add this at the end.

Code:
noStroke();
fill(255);
ellipse(0,0,150,150);


Wink
Re: another arc() issue
Reply #2 - May 10th, 2010, 1:13pm
 
Yes, this is a solution, but not in my case, because I have a few arcs in the scene, making a kind of spiral.
thanks for the try. Any other trick?
Re: another arc() issue
Reply #3 - May 10th, 2010, 2:44pm
 
How about this?

Code:
size(800,800);
noFill();
strokeCap(SQUARE);
background(255);
translate(width/2,height/2);
rotate(-180);

for (int i=0; i<13; i++) {
 stroke(130,136,141);
 strokeWeight(200);
 arc(0, 0, 350, 350, radians(i*i), radians(i*i+i) );
 if(i==11){
   strokeWeight(150);
   arc(0, 0, 550, 550, radians(i*i), radians(i*i+i) );
 }
}
Re: another arc() issue
Reply #4 - May 11th, 2010, 6:09am
 
Yes, you got it! This will work..  

Thanks a lot!   Smiley
Page Index Toggle Pages: 1