Package javax.vecmath

Examples of javax.vecmath.Point2d.interpolate()


        double rad=BondTools.giveAngleBothMethods(new Point2d(wedge.firstPointX,wedge.firstPointY), new Point2d(wedge.firstPointX+100,wedge.firstPointY), new Point2d(wedge.secondPointX,wedge.secondPointY), true);
        int degrees=(int)(360*(rad/(2*Math.PI)));
        // draw by interpolating along the imaginary straight line
        for (int i = 0; i < numberOfCircles; i++) {
            Point2d p1 = new Point2d();
            p1.interpolate(vertexA, vertexB, d);
            Point2d p2 = new Point2d();
            p2.interpolate(vertexA, vertexB, d+1/numberOfCircles);
           
            int[] p1T = this.transformPoint(p1.x, p1.y);
            int[] p2T = this.transformPoint(p2.x, p2.y);
View Full Code Here


        // draw by interpolating along the imaginary straight line
        for (int i = 0; i < numberOfCircles; i++) {
            Point2d p1 = new Point2d();
            p1.interpolate(vertexA, vertexB, d);
            Point2d p2 = new Point2d();
            p2.interpolate(vertexA, vertexB, d+1/numberOfCircles);
           
            int[] p1T = this.transformPoint(p1.x, p1.y);
            int[] p2T = this.transformPoint(p2.x, p2.y);
            int wh = (int) (new Point2d(p1T[0],p1T[1]).distance(new Point2d(p2T[0],p2T[1])));
View Full Code Here

       
        // draw by interpolating along the edges of the triangle
        for (int i = 0; i < numberOfDashes; i++) {
            double d2 = d-gapFactor;
            Point2d p1 = new Point2d();
            p1.interpolate(vertexA, vertexB, d);
            Point2d p2 = new Point2d();
            p2.interpolate(vertexA, vertexC, d2);
            int[] p1T = this.transformPoint(p1.x, p1.y);
            int[] p2T = this.transformPoint(p2.x, p2.y);
            this.g.drawLine(p1T[0], p1T[1], p2T[0], p2T[1]);
View Full Code Here

        for (int i = 0; i < numberOfDashes; i++) {
            double d2 = d-gapFactor;
            Point2d p1 = new Point2d();
            p1.interpolate(vertexA, vertexB, d);
            Point2d p2 = new Point2d();
            p2.interpolate(vertexA, vertexC, d2);
            int[] p1T = this.transformPoint(p1.x, p1.y);
            int[] p2T = this.transformPoint(p2.x, p2.y);
            this.g.drawLine(p1T[0], p1T[1], p2T[0], p2T[1]);
            if(old==null)
              old = p2T;
View Full Code Here

        double d = 0;
       
        // draw by interpolating along the edges of the triangle
        for (int i = 0; i < numberOfDashes; i++) {
            Point2d p1 = new Point2d();
            p1.interpolate(vertexA, vertexB, d);
            Point2d p2 = new Point2d();
            p2.interpolate(vertexA, vertexC, d);
            int[] p1T = this.transformPoint(p1.x, p1.y);
            int[] p2T = this.transformPoint(p2.x, p2.y);
            this.g.drawLine(p1T[0], p1T[1], p2T[0], p2T[1]);
View Full Code Here

        // draw by interpolating along the edges of the triangle
        for (int i = 0; i < numberOfDashes; i++) {
            Point2d p1 = new Point2d();
            p1.interpolate(vertexA, vertexB, d);
            Point2d p2 = new Point2d();
            p2.interpolate(vertexA, vertexC, d);
            int[] p1T = this.transformPoint(p1.x, p1.y);
            int[] p2T = this.transformPoint(p2.x, p2.y);
            this.g.drawLine(p1T[0], p1T[1], p2T[0], p2T[1]);
            if (distance * (d + gapFactor) >= distance) {
                break;
View Full Code Here

             
              // draw by interpolating along the edges of the triangle
              for (int i = 0; i < numberOfDashes; i++) {
                  double d2 = d-gapFactor;
                  Point2d p1 = new Point2d();
                  p1.interpolate(vertexA, vertexB, d);
                  Point2d p2 = new Point2d();
                  p2.interpolate(vertexA, vertexC, d2);
                  double[] p1T = this.transformPoint(p1.x, p1.y);
                  double[] p2T = this.transformPoint(p2.x, p2.y);
              svg.append(String.format(
View Full Code Here

              for (int i = 0; i < numberOfDashes; i++) {
                  double d2 = d-gapFactor;
                  Point2d p1 = new Point2d();
                  p1.interpolate(vertexA, vertexB, d);
                  Point2d p2 = new Point2d();
                  p2.interpolate(vertexA, vertexC, d2);
                  double[] p1T = this.transformPoint(p1.x, p1.y);
                  double[] p2T = this.transformPoint(p2.x, p2.y);
              svg.append(String.format(
                "<line x1=\"%4.2f\" y1=\"%4.2f\" x2=\"%4.2f\" y2=\"%4.2f\" " +
                "style=\"stroke:black; stroke-width:1px;\" />",
View Full Code Here

        double d = 0;
       
        // draw by interpolating along the edges of the triangle
        for (int i = 0; i < numberOfDashes; i++) {
            Point2d p1 = new Point2d();
            p1.interpolate(vertexA, vertexB, d);
            Point2d p2 = new Point2d();
            p2.interpolate(vertexA, vertexC, d);
            double[] p1T = this.transformPoint(p1.x, p1.y);
            double[] p2T = this.transformPoint(p2.x, p2.y);
        svg.append(String.format(
View Full Code Here

        // draw by interpolating along the edges of the triangle
        for (int i = 0; i < numberOfDashes; i++) {
            Point2d p1 = new Point2d();
            p1.interpolate(vertexA, vertexB, d);
            Point2d p2 = new Point2d();
            p2.interpolate(vertexA, vertexC, d);
            double[] p1T = this.transformPoint(p1.x, p1.y);
            double[] p2T = this.transformPoint(p2.x, p2.y);
        svg.append(String.format(
          "<line x1=\"%4.2f\" y1=\"%4.2f\" x2=\"%4.2f\" y2=\"%4.2f\" " +
          "style=\"stroke:black; stroke-width:1px;\" />",
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.