Package eas.math.geometry

Examples of eas.math.geometry.Vector2D.sub()


            v.sub(new Vector2D(x1, y1));
            v.norm();
            v.mult(this.pfeilSpLaenge);
            Vector2D v1 = new Vector2D(x1, y1);
            Vector2D v2 = new Vector2D(x2, y2);
            v2.sub(v);
           
            Vector2D n1 = new Vector2D((x1 + x2) / 2, (y1 + y2) / 2);
            Vector2D n2 = new Vector2D((x1 + x2) / 2, (y1 + y2) / 2);
            v.ortho();
            v.norm();
View Full Code Here


            Vector2D n1 = new Vector2D((x1 + x2) / 2, (y1 + y2) / 2);
            Vector2D n2 = new Vector2D((x1 + x2) / 2, (y1 + y2) / 2);
            v.ortho();
            v.norm();
            Vector2D zwisch = new Vector2D(x2, y2);
            zwisch.sub(new Vector2D(x1, y2));
           
            v.mult(Math.sqrt(Math.max(dist - 100, 0)) + 0.1);
           
           
            n1.translate(v);
View Full Code Here

                            x2 = pol.xpoints[1];
                            y1 = pol.ypoints[0];
                            y2 = pol.ypoints[1];

                            Vector2D verschOrtho = new Vector2D(x1, y1);
                            verschOrtho.sub(new Vector2D(x2, y2));
                            Vector2D verschPar = new Vector2D(verschOrtho);
                            verschPar.norm();
                            verschPar.mult(30);
                            verschOrtho.ortho();
                            verschOrtho.norm();
View Full Code Here

       
        p11 = new Vector2D(punkte.get(punkte.nPoints() - 1));
        p12 = new Vector2D(p11);
       
        p11.translate(c2);
        p12.sub(c2);
       
        pktList1.add(p11);
        pktList2.add(p12);
       
        // Pfeilspitze.
View Full Code Here

                                              false,
                                              false,
                                              false);

                    norm = new Vector2D(letzte[j].x, letzte[j].y);
                    norm.sub(new Vector2D(
                            rob.getPosition().x,
                            rob.getPosition().y));
                    norm.ortho();
                    norm.norm();
                   
View Full Code Here

        }

        if (nummer == 2) {
            a = new Pfeilspitze("Doppelspitzes Ende");
            v = new Vector2D(Vector2D.NULL_VECTOR);
            v.sub(new Vector2D(0, 0.3));
            a.add(v);
        }

        if (nummer == 3) {
            a = new Pfeilspitze(
View Full Code Here

                                     1,
                                     Vector2D.NULL_VECTOR);
           
        } else {
            Vector2D vv = new Vector2D(x2, y2);
            vv.sub(new Vector2D(x1, y1));
            vv.norm();
            vv.mult(35);
           
            x1 += vv.x;
            y1 += vv.y;
View Full Code Here

                x2 = (int) x2d;
                y1 = (int) y1d;
                y2 = (int) y2d;
            } else {
                Vector2D v0 = new Vector2D(x2, y2);
                v0.sub(new Vector2D(x1, y1));
                v0.ortho();
                v0.norm();
                v0.mult(12);
               
                x1 += v0.x;
View Full Code Here

                    for (int i = 0; i < ZeichFen.this.pfeilPol.nPoints(); i++) {
                        if (ZeichFen.this.markierte.contains(i)) {
                           
                            neu = new Vector2D(ZeichFen.this.pfeilPol.get(i));
                            neu.translate(vek);
                            neu.sub(ZeichFen.this.ersteEcke);
                           
                            ZeichFen.this.pfeilPol.set(i, neu);
                        }
                    }
                   
View Full Code Here

        Polygon2D quad = new Polygon2D();
        Vector2D xSub = new Vector2D(radius * 1.5, 0);
        Vector2D ySub = new Vector2D(0, radius * 1.5);
        Vector2D zwisch;
        zwisch = new Vector2D(linksOben);
        zwisch.sub(xSub);
        zwisch.sub(ySub);
        quad.add(zwisch);

        zwisch = new Vector2D(linksOben.x, linksOben.y + radius * 4 + radius);
        zwisch.sub(xSub);
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.