Re: [Flashcoders] Drawing an arc with curveTo
Thanks Ivan, What I needed was the maths to calculate the positions of the control points - found it here: > Advanced drawing methods in Macromedia Flash MX: > http://www.adobe.com/devnet/flash/articles/adv_draw_methods.html Thanks, Alias 2008/8/4 Ivan Dembicki <[EMAIL PROTECTED]>: > Hello Alias, > > http://bezier.googlecode.com > need Bezier.setPoint method > http://bezier.ru/wp-content/uploads/2008/06/bezier.swf?demo=3 > You can approximate circle arc using quadratic bezier - minimal > number of curves for one circle is 8. > > Also you can look at AS1 library at layer51, for example: > http://proto.layer51.com/d.aspx?f=388 > > Also I can add usage examples to Bezier package > just I need to know what exactly you need. > > -- > iv > http://www.bezier.ru > http://bezier.googlecode.com > ___ > 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
ok ignore that, i misread the question:) On Mon, Aug 4, 2008 at 11:22 AM, Hans Wichman < [EMAIL PROTECTED]> wrote: > Hi, > > here is a simple one usig curveTo's to create a fluid line: > http://objectpainters.com/blog/2007/07/18/drawing-using-controlpoints/ > > greetz > JC > > On Mon, Aug 4, 2008 at 10:03 AM, Ivan Dembicki <[EMAIL PROTECTED]> > wrote: > >> Hello Alias, >> >> http://bezier.googlecode.com >> you need Bezier.setPoint method >> http://bezier.ru/wp-content/uploads/2008/06/bezier.swf?demo=3 >> You can approximate circle arc using quadratic bezier - minimal >> number of curves for one circle is 8. >> >> Advanced drawing methods in Macromedia Flash MX: >> http://www.adobe.com/devnet/flash/articles/adv_draw_methods.html >> >> Also you can look at AS1 library at layer51, for example: >> http://proto.layer51.com/d.aspx?f=388 >> >> Also I can add usage examples to Bezier package >> just I need to know what exactly you need. >> >> -- >> iv >> http://www.bezier.ru >> http://bezier.googlecode.com >> ___ >> 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
Hi, here is a simple one usig curveTo's to create a fluid line: http://objectpainters.com/blog/2007/07/18/drawing-using-controlpoints/ greetz JC On Mon, Aug 4, 2008 at 10:03 AM, Ivan Dembicki <[EMAIL PROTECTED]> wrote: > Hello Alias, > > http://bezier.googlecode.com > you need Bezier.setPoint method > http://bezier.ru/wp-content/uploads/2008/06/bezier.swf?demo=3 > You can approximate circle arc using quadratic bezier - minimal > number of curves for one circle is 8. > > Advanced drawing methods in Macromedia Flash MX: > http://www.adobe.com/devnet/flash/articles/adv_draw_methods.html > > Also you can look at AS1 library at layer51, for example: > http://proto.layer51.com/d.aspx?f=388 > > Also I can add usage examples to Bezier package > just I need to know what exactly you need. > > -- > iv > http://www.bezier.ru > http://bezier.googlecode.com > ___ > 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
Hello Alias, http://bezier.googlecode.com you need Bezier.setPoint method http://bezier.ru/wp-content/uploads/2008/06/bezier.swf?demo=3 You can approximate circle arc using quadratic bezier - minimal number of curves for one circle is 8. Advanced drawing methods in Macromedia Flash MX: http://www.adobe.com/devnet/flash/articles/adv_draw_methods.html Also you can look at AS1 library at layer51, for example: http://proto.layer51.com/d.aspx?f=388 Also I can add usage examples to Bezier package just I need to know what exactly you need. -- iv http://www.bezier.ru http://bezier.googlecode.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
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