Examples of Vector2d


Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D

     * @param alpha azimuthal angle \( \alpha \)
     * @see #getAlpha()
     */
    public S1Point(final double alpha) {
        this(MathUtils.normalizeAngle(alpha, FastMath.PI),
             new Vector2D(FastMath.cos(alpha), FastMath.sin(alpha)));
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D

    @Test(expected=ConvergenceException.class)
    public void testConvergenceException() {
        final Collection<Vector2D> points = new ArrayList<Vector2D>();

        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(1, 5));
        points.add(new Vector2D(0, 7));
        points.add(new Vector2D(1, 10));
        points.add(new Vector2D(1, 20));
        points.add(new Vector2D(20, 20));
        points.add(new Vector2D(20, 40));
        points.add(new Vector2D(40, 1));

        @SuppressWarnings("unused")
        final ConvexHull2D hull = new MonotoneChain(true, 2).generate(points);
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D

    }

    @Test
    public void testAllIdentical() {
        final Collection<Vector2D> points = new ArrayList<Vector2D>();
        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(1, 1));

        final ConvexHull2D hull = generator.generate(points);
        Assert.assertTrue(hull.getVertices().length == 1);
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D

    }

    @Test
    public void testCollinearPoints() {
        final Collection<Vector2D> points = new ArrayList<Vector2D>();
        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(2, 2));
        points.add(new Vector2D(2, 4));
        points.add(new Vector2D(4, 1));
        points.add(new Vector2D(10, 1));

        final ConvexHull2D hull = generator.generate(points);
        checkConvexHull(points, hull);
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D

    }

    @Test
    public void testCollinearPointsReverse() {
        final Collection<Vector2D> points = new ArrayList<Vector2D>();
        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(2, 2));
        points.add(new Vector2D(2, 4));
        points.add(new Vector2D(10, 1));
        points.add(new Vector2D(4, 1));

        final ConvexHull2D hull = generator.generate(points);
        checkConvexHull(points, hull);
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D

    }

    @Test
    public void testCollinearPointsIncluded() {
        final Collection<Vector2D> points = new ArrayList<Vector2D>();
        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(2, 2));
        points.add(new Vector2D(2, 4));
        points.add(new Vector2D(4, 1));
        points.add(new Vector2D(10, 1));

        final ConvexHull2D hull = createConvexHullGenerator(true).generate(points);
        checkConvexHull(points, hull, true);
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D

    }

    @Test
    public void testCollinearPointsIncludedReverse() {
        final Collection<Vector2D> points = new ArrayList<Vector2D>();
        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(2, 2));
        points.add(new Vector2D(2, 4));
        points.add(new Vector2D(10, 1));
        points.add(new Vector2D(4, 1));

        final ConvexHull2D hull = createConvexHullGenerator(true).generate(points);
        checkConvexHull(points, hull, true);
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D

    }

    @Test
    public void testIdenticalPoints() {
        final Collection<Vector2D> points = new ArrayList<Vector2D>();
        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(2, 2));
        points.add(new Vector2D(2, 4));
        points.add(new Vector2D(4, 1));
        points.add(new Vector2D(1, 1));

        final ConvexHull2D hull = generator.generate(points);
        checkConvexHull(points, hull);
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D

    }

    @Test
    public void testIdenticalPoints2() {
        final Collection<Vector2D> points = new ArrayList<Vector2D>();
        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(2, 2));
        points.add(new Vector2D(2, 4));
        points.add(new Vector2D(4, 1));
        points.add(new Vector2D(1, 1));

        final ConvexHull2D hull = createConvexHullGenerator(true).generate(points);
        checkConvexHull(points, hull, true);
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Vector2D

    }

    @Test
    public void testClosePoints() {
        final Collection<Vector2D> points = new ArrayList<Vector2D>();
        points.add(new Vector2D(1, 1));
        points.add(new Vector2D(2, 2));
        points.add(new Vector2D(2, 4));
        points.add(new Vector2D(4, 1));
        points.add(new Vector2D(1.00001, 1));

        final ConvexHull2D hull = generator.generate(points);
        checkConvexHull(points, hull);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.