Archive

Archive for March, 2010

Quad Bezier Arc Length Revisited

March 29, 2010 3 comments

This question comes up quite regularly.  While in general, the elliptic integral for arc length of a parametric curve has no closed-form solution, the problem is tractable for a quadratic Bezier.  The integral is quite involved.  It is discussed in this post, including a reference to the solution.

Now, just because you have a formula for something does not necessarily mean you should always use it.  There are several divisions in the equation and some quads. can result in near-zero divisors.  There are other numerical issues, some of which can be exposed by exploring the Degrafa demo provided in the above post.

Computationally, the closed-form solution is close to a wash with numerical integration.  While the latter does have some subtle issues, I tend to use the numerical approach as it works for all parameteric curves and all values of the natural parameter.  The closed-form solution for the quad. only works for quadratic Beziers at t=1.   The numerical method can be used for arc-length parameterization as well as the segment problem; that is, computing the arc length of a segment of a curve from t=t1 to t=t2.

If you are a calculus student, you should study the derivation of the closed-form formula as it’s a great example of integration 🙂

Categories: Degrafa, Math Tags: ,

Flash Builder and SVN on Mac

March 24, 2010 11 comments

I’m trying to setup SVN in Flash Builder 4  (production release, not beta) on a Mac (Snow Leopard).  Done it multiple times on PC’s, but the process is quite different on a Mac.  I tried following the Flash Magazine tutorial, but no luck.  I’m about ready to bail and go with SmartSVN.

If you have setup SVN with Flash Builder on a Mac and are willing to help out a new Mac user, please email me at theAlgorithmist[at]gmail[dot].com.  Thanks for your time!

Categories: Flex Tags:

Near-term Gig in D/FW Area

March 18, 2010 Comments off

If you are a solid Flash developer and looking for a short-term gig in the D/FW area, I’m trying to help a friend at a recruiting firm fill a position.  As I understand it, the gig is with a retailer and involves all the usual suspects ranging from connecting to a back end, integrating with a file uploader, lots of UI interactivity, etc.  If you are immediately available and have a demonstrable portfolio, please contact Ben Hollingsworth at The InSource Group, ben[at]insourcegroup.com .  Ben is an awesome guy and InSource is great to work  with, so jump on this if you have the required background.

FYI – Seems like most of the work can be done at home, but there is a need to meet and interact with the client on site.  Good luck!

Categories: Flash Tags: ,

Quad. Bezier Interpolation

March 17, 2010 Comments off

As I’m winding down on a long gig, I hope to return to answering questions and doing more work on Degrafa. The backlog of questions is in the hundreds, so I’m going to start with recent topics first. This question involves quadratic Bezier interpolation or fitting a quad. Bezier through three points. It seems to involve selection of the t-parameter at the inner control point. The first and last control points, P0 and P2 are fixed at t=0 and t=1. The problem involves selection of the inner control point, P1, so that the Bezier curve passes through some specified point, P.

This problem is actually over-determined; that is, there are more degrees of freedom than constraints. The online demo is here, including a link to TechNotes providing the equations. P1 is not uniquely determined given P. We must also choose the t-parameter at which the quad. Bezier passes through P. This selection influences the shape of the curve.  Although the so-called midpoint formula has been floated around in the Flash community, the Singularity code uses a chord-length parameterization to choose t.

The same problem exists for fitting a cubic Bezier through four points, although now we are free to choose two t-parameters at inner interpolation points.  This is implemented in Degrafa using a uniform parameterization.

Hope this helps.

Categories: Flash, Math Tags: , , ,

More Indoor Tennis in D/FW Area

March 2, 2010 Comments off

Do you play tennis in the D/FW area and live relatively close to the airport? Bummed out by the bad weather this winter? Well, the Hilton D/FW Lakes has the solution for you. They have reopened indoor courts. The court area alternates between meeting space and tennis, so it’s important to check ahead for availability and make a reservation.

Rates are very reasonable for indoor courts, $15/hour for sports club members and $20/hour for non-members. I’ll post some pics or video whenever possible. In the mean time, contact the sports club for more information at 817.481.8444.

Categories: Tennis Tags: ,