Package com.emitrom.lienzo.client.core.util

Examples of com.emitrom.lienzo.client.core.util.Matrix


        Point2D p3_ = target.getPoint(2);

        double[][] eq = { { p1.getX(), p1.getY(), 1, 0, 0, 0 }, { 0, 0, 0, p1.getX(), p1.getY(), 1 }, { p2.getX(), p2.getY(), 1, 0, 0, 0 }, { 0, 0, 0, p2.getX(), p2.getY(), 1 }, { p3.getX(), p3.getY(), 1, 0, 0, 0 }, { 0, 0, 0, p3.getX(), p3.getY(), 1 }, };

        double[][] s = { { p1_.getX(), p1_.getY(), p2_.getX(), p2_.getY(), p3_.getX(), p3_.getY() } };
        Matrix m = new Matrix(eq);
        Matrix rhs = new Matrix(s).transpose();
        Matrix T = m.solve(rhs);

        double[][] d = T.getData();
        return new Transform(d[0][0], d[3][0], d[1][0], d[4][0], d[2][0], d[5][0]);
    }
View Full Code Here

TOP

Related Classes of com.emitrom.lienzo.client.core.util.Matrix

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.