Re: [Flashcoders] Drawing a continuous curved line through n points in AS1 or AS2 (Catmull-Rom splines?)
This also might be ready made solution to use: http://www.mediaverk.lv/asd/#polygon 2008/11/15 Ivan Dembicki [EMAIL PROTECTED] Hello matt, look at http://bezier.googlecode.com/files/ru.bezier.zip -- 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 a continuous curved line through n points in AS1 or AS2 (Catmull-Rom splines?)
Everyone, Many thanks for these excellent examples and suggestions. Ivan's example in particular is really slick. One more example I found that's also really terrific: Andreas Weber's MotionDraw class (http://www.motiondraw.com/md/as_samples/t/CatmullRomSpline/tween.html) I wish I wasn't so math illiterate - I could be a better judge of the quality of each of these solutions. It does look like there are MANY solutions to drawing a curved line through a series of points, but in my naive opinion, Andreas' class produces aesthetically beautiful curves - rounded, but not too much, and very efficient. Anyway, thanks again to all. Cheers, Matt Stuehler On Sun, Nov 16, 2008 at 8:07 AM, Janis Radins [EMAIL PROTECTED] wrote: This also might be ready made solution to use: http://www.mediaverk.lv/asd/#polygon 2008/11/15 Ivan Dembicki [EMAIL PROTECTED] Hello matt, look at http://bezier.googlecode.com/files/ru.bezier.zip -- 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Drawing a continuous curved line through n points in AS1 or AS2 (Catmull-Rom splines?)
All, I'm looking for an AS1 (ideal) or AS2 version of a function that will draw a continuous curved line through n points. I don't know much about the math behind this, but I think that a Catmull-Rom spline is what I'm looking for. I've found a terrific example in AS3 (http://www.cartogrammar.com/blog/continuous-curves-with-actionscript-3), but it uses a number of AS3 classes that I don't have access to in AS2 (e.g., fl.motion.BezierSegment). Can anyone share a working example, or point me in a useful direction? Many thanks in advance! Cheers, Matt ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Drawing a continuous curved line through n points in AS1 or AS2 (Catmull-Rom splines?)
I don't know of a good as1/2 lib. This math has a lot to do with line smoothing, and can be used for various applications from graphics to accurate signal processing. I would suggest brushing up on your calculus/trig for assuming the tangency of a given point on the locus, and for assuming the points on the cage. Hints: * calculating the first segment of the curve is always the most intensive imho. (although their are tons of methods for cheating this, they effect accuracy) * It all has to do with finding the axis of symmetry to project an accurate curve, and finding the points on the quadratic or cubic(way easier but slower because it has more points) cage. * If you already have the previous points, for the last segment of the curve, you already know several of the points for the next segment. If anything, learning what is required for this project, although having an uphill learning curve, will make you a better mathematician. Anyone else have hints? Thank You, Anthony Pace matt stuehler wrote: All, I'm looking for an AS1 (ideal) or AS2 version of a function that will draw a continuous curved line through n points. I don't know much about the math behind this, but I think that a Catmull-Rom spline is what I'm looking for. I've found a terrific example in AS3 (http://www.cartogrammar.com/blog/continuous-curves-with-actionscript-3), but it uses a number of AS3 classes that I don't have access to in AS2 (e.g., fl.motion.BezierSegment). Can anyone share a working example, or point me in a useful direction? Many thanks in advance! Cheers, Matt ___ 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 a continuous curved line through n points in AS1 or AS2 (Catmull-Rom splines?)
Hi, you might be looking for a bezier thingy, or it might just be as simple as averaging the control points: If it's the latter, there's some sample source here for something like that: http://objectpainters.com/blog/2007/07/18/drawing-using-controlpoints/ greetz JC On Sat, Nov 15, 2008 at 9:40 PM, Anthony Pace [EMAIL PROTECTED] wrote: I don't know of a good as1/2 lib. This math has a lot to do with line smoothing, and can be used for various applications from graphics to accurate signal processing. I would suggest brushing up on your calculus/trig for assuming the tangency of a given point on the locus, and for assuming the points on the cage. Hints: * calculating the first segment of the curve is always the most intensive imho. (although their are tons of methods for cheating this, they effect accuracy) * It all has to do with finding the axis of symmetry to project an accurate curve, and finding the points on the quadratic or cubic(way easier but slower because it has more points) cage. * If you already have the previous points, for the last segment of the curve, you already know several of the points for the next segment. If anything, learning what is required for this project, although having an uphill learning curve, will make you a better mathematician. Anyone else have hints? Thank You, Anthony Pace matt stuehler wrote: All, I'm looking for an AS1 (ideal) or AS2 version of a function that will draw a continuous curved line through n points. I don't know much about the math behind this, but I think that a Catmull-Rom spline is what I'm looking for. I've found a terrific example in AS3 (http://www.cartogrammar.com/blog/continuous-curves-with-actionscript-3), but it uses a number of AS3 classes that I don't have access to in AS2 (e.g., fl.motion.BezierSegment). Can anyone share a working example, or point me in a useful direction? Many thanks in advance! Cheers, Matt ___ 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Drawing a continuous curved line through n points in AS1 or AS2 (Catmull-Rom splines?)
Hello matt, look at http://bezier.googlecode.com/files/ru.bezier.zip -- iv http://www.bezier.ru http://bezier.googlecode.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders