Re: [Flashcoders] Drawing an arc with curveTo
Hi Alias, I'm not sure I understand what you mean by 'arc' -- isn't anything you do with curveTo an arc? If that helps, I have some related code attached that I wrote a while ago. It's a bezier curve that you can drag directly to modify, i.e., not by moving the control point but holding on to the curve itself. So, it contains the math to calculate/guess a point /on/ the curve and its t (in the 0..1 range) from a given point /near/ the curve, and it can calculate the required control point to give you a curve that goes through a given point at a given t. It's in haXe, but should translate very easily. BezierTest.hx is just a hackish test, Bezier.hx contains the math -- moveControlPoint is probably what you're looking for. HTH, Mark On Sun, Aug 3, 2008 at 11:53 PM, Alias™ <[EMAIL PROTECTED]> wrote: > Hi guys, > > Can anyone point me towards some info on how to draw a proper curved > arc in actionscript using curveTo? I've seen plenty of stuff about how > to draw an arc using loads of short lines, but that isn't really going > to cut it - I need this to be efficient and look good. > > I believe the crux of the matter is working out the correct coords for > the control points - is there any info on computing the curvature of a > line segment on a quadratic bezier? Has anyone cracked this? > > Thanks in advance, > Alias > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Drawing an arc with curveTo
Try having a look at this http://theolagendijk.wordpress.com/2006/08/18/flash-drawing-api-bezier/ Never used it but it looks well thought out. Ron Alias™ wrote: Hi guys, Can anyone point me towards some info on how to draw a proper curved arc in actionscript using curveTo? I've seen plenty of stuff about how to draw an arc using loads of short lines, but that isn't really going to cut it - I need this to be efficient and look good. I believe the crux of the matter is working out the correct coords for the control points - is there any info on computing the curvature of a line segment on a quadratic bezier? Has anyone cracked this? Thanks in advance, Alias ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Drawing an arc with curveTo
Google "actionscript bezier" Lots of solutions come up. Ron Alias™ wrote: Hi guys, Can anyone point me towards some info on how to draw a proper curved arc in actionscript using curveTo? I've seen plenty of stuff about how to draw an arc using loads of short lines, but that isn't really going to cut it - I need this to be efficient and look good. I believe the crux of the matter is working out the correct coords for the control points - is there any info on computing the curvature of a line segment on a quadratic bezier? Has anyone cracked this? Thanks in advance, Alias ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Drawing an arc with curveTo
Hi guys, Can anyone point me towards some info on how to draw a proper curved arc in actionscript using curveTo? I've seen plenty of stuff about how to draw an arc using loads of short lines, but that isn't really going to cut it - I need this to be efficient and look good. I believe the crux of the matter is working out the correct coords for the control points - is there any info on computing the curvature of a line segment on a quadratic bezier? Has anyone cracked this? Thanks in advance, Alias ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders