Package chunmap.model.coord

Examples of chunmap.model.coord.Coordinate2D


  public CPoint computeCenter() {
    double x = (p1.getX() + p2.getX() + p3.getX()) / 3d;
    double y = (p1.getY() + p2.getY() + p3.getY()) / 3d;

    return new Coordinate2D(x, y);
  }
View Full Code Here


    double af = 6.28 / pointNum;
    for (double a = 0; a < 6.28; a += af) {
      double dx = Math.sin(a) * distance;
      double dy = Math.cos(a) * distance;

      CPoint pp = new Coordinate2D(p.getX() + dx, p.getY() + dy);
      points.add(pp);
    }
    CoordSeqEditor ls = new CoordSeqEditor(points);
    ls.close();
    Polygon pg = new Polygon(new Ring(ls.toCoordinateSeq()));
View Full Code Here

TOP

Related Classes of chunmap.model.coord.Coordinate2D

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.