On 02-Dec-2013 10:41, alvinpenner wrote:
Assuming the arc is defined with respect to an ellipse with major axis A
unfortunately I did not express myself very clearly in that comment. My comment made it sound as though the problem at hand is conversion of an arc to a Bezier. But of course that is not true, the problem at hand is the conversion of an arbitrary sbasis curve to a Bezier without having any knowledge at all of what the original function was that led to the sbasis in the first place. That function may have been an elliptical arc or it may have been something else like a Hypotrochoid, not very likely but still conceivable.
Would a close approximation to normalization suffice? If so, find a convenient number of standard points on the curve, perhaps the 6 points at t=0,0.2,0.4,0.6,0.8,and 1.0. Project these onto a set of standard lines every 15 degrees between 0 and 180 degrees, and find the distance between the other points on each projection. Use the maximum of those distances as the extent value. (Alternatively calculate a principal component, but I suspect that using the standard projections would be faster.)
There are two sources of error:
1. The maximum extent points might not be included in the set. I cannot estimate this error, it depends on what sorts of cusps and so forth that the s-basis allows, and I know nothing about s-basis curves.
2. The arbitrarily scaled and rotated curve may have its true extent vector rotated from one of the standard vectors by at most 7.5 degrees, so the extent can only be off by at most a factor of 1.0 - cos(7.5deg) == .0086.
Since the issue you are correcting for sounds like it only shows up when there are large differences in scale, these very small differences in the normalized curve should not be a problem.
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech