samskivert / pythagoras

A portable library of geometry classes for Java
Apache License 2.0
44 stars 14 forks source link

infinite loop issue #19

Open rubypdf opened 11 years ago

rubypdf commented 11 years ago

the following code get infinite loop in the method cubicNewton of GeometryUtil

private static void cubicNewton (double[] xCoefs1, double[] yCoefs1, double[] xCoefs2, double[] yCoefs2, double[] params)

    int w = 150;
    int h = 150;
    double ew = w/2;
    double eh = h/2;
    Ellipse leaf=new Ellipse();
    Area leaf1=new Area(leaf);      
    leaf.setFrame(ew-16, eh-29, 15.0, 15.0);
    leaf1 = new Area(leaf);
    leaf.setFrame(ew-14, eh-47, 30.0, 30.0);
    Area leaf2 = new Area(leaf);
    leaf1.intersect(leaf2);