Package de.lmu.ifi.dbs.elki.math.geometry.SweepHullDelaunay2D

Examples of de.lmu.ifi.dbs.elki.math.geometry.SweepHullDelaunay2D.Triangle


    CanvasSize viewport = proj.estimateViewport();
    for(int i = 0; i < delaunay.size(); i++) {
      SweepHullDelaunay2D.Triangle del = delaunay.get(i);
      final double[] projcx = proj.fastProjectDataToRenderSpace(del.m.getArrayRef());
      if(del.ab > i) {
        Triangle oth = delaunay.get(del.ab);
        path.moveTo(projcx);
        path.drawTo(proj.fastProjectDataToRenderSpace(oth.m.getArrayRef()));
      }
      else if(del.ab < 0) {
        double[] dirv = VMath.minus(means.get(del.a), means.get(del.b));
        VMath.rotate90Equals(dirv);
        double[] dir = proj.fastProjectRelativeDataToRenderSpace(dirv);
        final double factor = viewport.continueToMargin(projcx, dir);
        if(factor > 0) {
          path.moveTo(projcx);
          path.relativeLineTo(factor * dir[0], factor * dir[1]);
        }
      }

      if(del.bc > i) {
        Triangle oth = delaunay.get(del.bc);
        path.moveTo(projcx);
        path.drawTo(proj.fastProjectDataToRenderSpace(oth.m.getArrayRef()));
      }
      else if(del.bc < 0) {
        double[] dirv = VMath.minus(means.get(del.b), means.get(del.c));
        VMath.rotate90Equals(dirv);
        double[] dir = proj.fastProjectRelativeDataToRenderSpace(dirv);
        final double factor = viewport.continueToMargin(projcx, dir);
        if(factor > 0) {
          path.moveTo(projcx);
          path.relativeLineTo(factor * dir[0], factor * dir[1]);
        }
      }

      if(del.ca > i) {
        Triangle oth = delaunay.get(del.ca);
        path.moveTo(projcx);
        path.drawTo(proj.fastProjectDataToRenderSpace(oth.m.getArrayRef()));
      }
      else if(del.ca < 0) {
        double[] dirv = VMath.minus(means.get(del.c), means.get(del.a));
View Full Code Here


    List<Vector> cur = new ArrayList<Vector>();

    for(int i = 0 /* = used.nextClearBit(0) */; i < delaunay.size() && i >= 0; i = used.nextClearBit(i + 1)) {
      if(used.get(i) == false) {
        used.set(i);
        Triangle tri = delaunay.get(i);
        if(tri.r2 <= alpha2) {
          // Check neighbors
          processNeighbor(cur, used, i, tri.ab, tri.b);
          processNeighbor(cur, used, i, tri.bc, tri.c);
          processNeighbor(cur, used, i, tri.ca, tri.a);
View Full Code Here

    if(ab >= 0) {
      if(used.get(ab)) {
        return;
      }
      used.set(ab);
      final Triangle next = delaunay.get(ab);
      if(next.r2 < alpha2) {
        // Continue where we left off...
        if(next.ab == i) {
          processNeighbor(cur, used, ab, next.bc, next.c);
          processNeighbor(cur, used, ab, next.ca, next.a);
View Full Code Here

TOP

Related Classes of de.lmu.ifi.dbs.elki.math.geometry.SweepHullDelaunay2D.Triangle

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.