RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v2]

Laurent Bourgès lbourges at openjdk.java.net
Fri Nov 12 19:12:36 UTC 2021


On Fri, 12 Nov 2021 05:47:56 GMT, Jeremy <duke at openjdk.java.net> wrote:

>> see condition number = magnitude range on such plot:
>> https://github.com/JuliaMath/AccurateArithmetic.jl/blob/master/test/figs/sum_accuracy.svg
>
> I just pushed a commit ( 40bda06 ) that addresses the machine error problem to my satisfaction. It includes a unit test that failed before that commit and now passes.
> 
> At your convenience let me know your thoughts. (That commit continues to focus on very small doubles; it may (?) need help to address very large double errors.)

That looks interesting as the new margin looks like ulp(x - bbox), however it may be not enough as the position error depends on curve polynom coefficients (magnitude).

I derived your (yesterday) test to play with the margin and try small to huge curves. 
I found the condition number ~ sum (abs(coeffs)) so margin = math.ulp(cond). But sometimes the quad solver is giving t with few ulps error that cause high position shifts.

I will go on testing your last approach and share my experiments

-------------

PR: https://git.openjdk.java.net/jdk/pull/6227



More information about the client-libs-dev mailing list