> The doc says that flatness is "the maximum allowable distance between
> the control points and the flattened curve." What does this mean?
Which spec? I think the Shape interface once said the maximum amount
that the control points can vary from colinear, which is not their
distance from the curve.
We have since revised the spec to say that it is the maximum distance
from the original curve to the returned flattened segments (i.e. the
maximum approximation error).
It is a spec for the maximum allowable distance. Individual implementations
may choose to outperform that requirement as they see fit, but none may
exceed that maximum distance.
> Is the curve sub-divided into smaller curves and then the distance from
> the control points of the sub-curve and the straight line connecting the
> sub-curve's end points checked?
Since the curve is bounded by the convex hull of the control points,
the distance from the control points to the line is provably greater
than the distance from the curve to the line. Thus, this metric would
suffice to satisfy the spec.
(This is the measurement used by Quad/CubicCurve2D and thus the
FlatteningPathIterator).
> Is it the maximum distance from the straight segment to the original
> curve itself?
This is what we are moving towards in the more recent versions of the
docs.
...jim
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/