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.
Page Index Toggle Pages: 1
Drawing arcs (Read 652 times)
Drawing arcs
Nov 11th, 2009, 8:28pm
 
Hello,

I'm working on a Processing sketch inspired by Donald Knuth's MetaFont to draw letterforms composed of lines and circle segments. I know about arc(), but instead of using Processing's normal line drawing function, I'd like to draw different shapes or images at the different points along the lines or arcs that make up the letterforms.

Is it possible to override arc() somehow to provide my own drawing function? Or, can someone point me to an equation that describes the x, y coordinates along an arc so that I can write my own function?

Thanks in advance,
Andrew
Re: Drawing arcs
Reply #1 - Nov 12th, 2009, 2:03am
 
you dont have to override you can just write your own arcs function.
I would probably use http://processing.org/reference/bezier_.html
if you dont want to use Arcs.
But whats wrong with arcs btw ?

Re: Drawing arcs
Reply #2 - Nov 12th, 2009, 2:04am
 
You can look into Processing's code... Or take any geometry book, equation of an arc isn't that hard.
Or, even simpler, you can use bezier or curve family, particularly the bezierPoint or curvePoint functions (I think bezier is closer of arc).
Page Index Toggle Pages: 1