FW beziers to Flash curves
Posted 03 April 2007 - 05:02 PM
So here's the challenge. I have more than a few commands and panels which would need to render FW point data in Flash. The problem is that Flash's drawing API fundamentally works in a different manner than FW and other apps. In plain terms, I observed that Flash uses a single handle between two points to create a curve, where as most drawing applications use the classic two handles for each point. After some research, it appears this is Quadratic vs. Cubic Bezier curves.
What I need, I suppose, is some way to translate FW(Cubic?) Bezier curves into Flash(Quadratic?) Bezier curves, so I can render in Flash what the user is doing. I hopefully won't ever need to convert the other way around, if I do it right all manipulations will be done to the FW point data and re-translated and rendered.
Just wondering if anyone happens to to carry around a FW-to-Flash formula in their back pocket and could pass it my way, or lend any advice
Posted 03 April 2007 - 07:10 PM
Posted 04 April 2007 - 07:27 AM
That being said, at the bottom of the article I linked to it looks like he actually has just that(3 different flavors to choose from, too!). But how it works is not quite what I was expecting... it takes 4 control points(two anchors and two handles between), not 3(single anchor with preceding/succeeding handles). I guess that's because it's technically drawing a line segment, not points. I think I can make that work... stay tuned!
Posted 05 April 2007 - 11:12 AM
Otherwise its just a matter of searching and finding those algorithyms that make that conversion.
Posted 07 April 2007 - 06:39 AM
[right-click above link, download to Fireworks 8/Configuration/Commands/, acces via Commands > 3D Rotate -- no restart required]
However, after I created the command I realized something that makes me feel very, very stupid. A FW command can actually update the canvas, so I didn't have to make that ridiculously big preview viewport with imported path data. Doh! I'm not sure if I should scrap that preview area thing and make the interface more like Illustrator's 3D Rotate with just a small interactive cube, or leave it like it is. What do you guys think?
Posted 07 April 2007 - 09:40 AM
personally, i don't mind the preview window, as it allows you to isolate what you're trying to "rotate." but, it also might be nice to see the canvas updating with the vector in context.
maybe "show axis" should be "show axes"?
but wow, you should sell this to adobe. it's that cool.
Posted 07 April 2007 - 11:39 AM
You're right about the 'axes' :-)
I want to see if I can make it remember 3D transform so you can re-rotate or remove 3D rotation later. Also want to see if I can use the distortion tools to make it apply to anything(text, bitmaps, symbols, etc), that would be great.
Posted 07 April 2007 - 01:45 PM
Posted 07 April 2007 - 01:50 PM
Posted 15 December 2010 - 12:47 AM