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 › shape arc form
Page Index Toggle Pages: 1
shape arc form (Read 1274 times)
shape arc form
May 20th, 2010, 7:58am
 
Hi. Any help to create a 1/4 arc shape without arc

...

thanks
Re: shape arc form
Reply #1 - May 20th, 2010, 8:13am
 
draw it yourself using

beginShape();
a combination of
vertex(); & bezierVertex();
and endShape();


http://processing.org/reference/bezierVertex_.html
Re: shape arc form
Reply #2 - May 20th, 2010, 12:49pm
 
As said. You can find ideas/math in How to do this shape thread...
Re: shape arc form
Reply #3 - May 20th, 2010, 1:19pm
 
maybe its easier to draw these forms in illustrator or a similar programm and copy the coordinates. or use a processing tool like "Doodle" or "bezier editor"
Re: shape arc form
Reply #4 - May 20th, 2010, 2:12pm
 
Here is a decent approximation:
Code:
void DrawArc(float x, float y, float r)
{
float l = (1 - pcr) * r;
float d = 2 * r;
// Internal radius, here set at half radius
float ir = r / 2;
// Assume here default CENTER mode
// I put x and y to top-left
x -= r; y -= r;

beginShape();
vertex(x, y + r); // Left
bezierVertex(x, y + l,
x + l, y,
x + r, y); // Top
vertex(x + r, y + ir); // Go down
bezierVertex(x + r - ir, y + ir,
x + r - ir, y + r,
x + r - ir, y + r); // Bottom
vertex(x, y + r); // Go back to left
endShape();
}
Page Index Toggle Pages: 1