Re: [Flashcoders] Bezier curve arrows

2010-03-18 Thread Anthony Pace
Hi Pual, I just noticed that I had already written something, but it didn't get sent to the list before the question got answered. Oh well...anyways: To find the angle, you have to find the slope of the tangent at that point of the curve; however, this is really easy because with bezier

Re: [Flashcoders] Bezier curve arrows

2010-03-18 Thread Anthony Pace
Oops. Just noticed how atrocious the writing was. On 3/18/2010 11:25 AM, Anthony Pace wrote: Hi Pual, I just noticed that I had already written something, but it didn't get sent to the list before the question got answered. Oh well...anyways: To find the angle, you have to find the slope

Re: [Flashcoders] Bezier curve arrows

2010-03-18 Thread Ivan Dembicki
Hello Paul, [...] how can I get the right angle to point it to? very easy: http://code.google.com/p/bezier/source/browse/trunk/bezier/src/flash/geom/Bezier.as getTangentAngle method. time parameter is 0 for start and 1 for end of bezier. good luck! -- iv http://www.bezier.ru

[Flashcoders] Bezier curve arrows

2010-03-16 Thread p...@ipauland.com
I was recently asked if I could add some arrowheads to some actionscript generated curves. I initially thought Triangle pointing to end point, and that would be a great solution. I can place a MC at the end of the curve, but how can I get the right angle to point it to?   Paul

Re: [Flashcoders] Bezier curve arrows

2010-03-16 Thread Pedro Kostelec
Calculate the derivative (the gradient, slope) at the end of the curve. But i have no idea how to do it is as3. Can we even calculate derivatives in AS3? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] Bezier curve arrows

2010-03-16 Thread John McCormack
What is the equation of the curve? John Pedro Kostelec wrote: Calculate the derivative (the gradient, slope) at the end of the curve. But i have no idea how to do it is as3. Can we even calculate derivatives in AS3? ___ Flashcoders mailing list

Re: [Flashcoders] Bezier curve arrows

2010-03-16 Thread Mark Winterhalder
Actionscript generated curves are quadratic beziers. The angle is easy to get at the end points -- the (quadratic) bezier is defined by three points, one where you start and two that you pass to the curveTo method. By definition, the line defined by those two points is the tangent at the end

Re: [Flashcoders] Bezier curve arrows

2010-03-16 Thread Glen Pike
p...@ipauland.com wrote: I was recently asked if I could add some arrowheads to some actionscript generated curves. I initially thought Triangle pointing to end point, and that would be a great solution. I can place a MC at the end of the curve, but how can I get the right angle to point it to?

Re: [Flashcoders] Bezier curve arrows

2010-03-16 Thread Paul Andrews
On 16/03/2010 17:24, Glen Pike wrote: p...@ipauland.com wrote: I was recently asked if I could add some arrowheads to some actionscript generated curves. I initially thought Triangle pointing to end point, and that would be a great solution. I can place a MC at the end of the curve, but how