Package fmg.fmg8.umgebung2D

Examples of fmg.fmg8.umgebung2D.Vektor2D.normal()


                                     Vektor2D.NULL_VEKTOR);
           
        } else {
            Vektor2D vv = new Vektor2D(x2, y2);
            vv.sub(new Vektor2D(x1, y1));
            vv.normal();
            vv.mult(35);
           
            x1 += vv.x;
            y1 += vv.y;
            x2 -= vv.x;
View Full Code Here


                y2 = (int) y2d;
            } else {
                Vektor2D v0 = new Vektor2D(x2, y2);
                v0.sub(new Vektor2D(x1, y1));
                v0.ortho();
                v0.normal();
                v0.mult(12);
               
                x1 += v0.x;
                x2 += v0.x;
                y1 += v0.y;
View Full Code Here

     * @return  Die Richtung der Geraden.
     */
    public Vektor2D getNormRicht() {
        Vektor2D richt = new Vektor2D(this.endPkt);
        richt.sub(anfPkt);
        richt.normal();
        return richt;
    }
   
    /**
     * @return  Die L�nge der Strecke.
View Full Code Here

        // Wall-Follow:
        final double epsilon = 0.1;
        int wf = 0;
        Vektor2D blick = new Vektor2D(rob.getBlickrichtung());
        blick.normal();
//        if (Math.abs(blick.y) < epsilon) {
        if (Math.abs(blick.x) < epsilon || Math.abs(blick.y) < epsilon) {
            wf++;
        } else {
            wf--;
View Full Code Here

                    norm = new Vektor2D(letzte[j].x, letzte[j].y);
                    norm.sub(new Vektor2D(
                            rob.getPosition().x,
                            rob.getPosition().y));
                    norm.ortho();
                    norm.normal();
                   
                    lang = rob.getFitSum();
                   
                    if (lang <= 0) {
                        lang = 5;
View Full Code Here

                                     Vektor2D.NULL_VEKTOR);
           
        } else {
            Vektor2D vv = new Vektor2D(x2, y2);
            vv.sub(new Vektor2D(x1, y1));
            vv.normal();
            vv.mult(35);
           
            x1 += vv.x;
            y1 += vv.y;
            x2 -= vv.x;
View Full Code Here

                y2 = (int) y2d;
            } else {
                Vektor2D v0 = new Vektor2D(x2, y2);
                v0.sub(new Vektor2D(x1, y1));
                v0.ortho();
                v0.normal();
                v0.mult(12);
               
                x1 += v0.x;
                x2 += v0.x;
                y1 += v0.y;
View Full Code Here

            Vektor2D v = new Vektor2D(x2, y2);
            double dist = new Vektor2D(x1, y1).distanz(new Vektor2D(x2, y2));
           
            v.sub(new Vektor2D(x1, y1));
            v.normal();
            v.mult(this.pfeilSpLaenge);
            Vektor2D v1 = new Vektor2D(x1, y1);
            Vektor2D v2 = new Vektor2D(x2, y2);
            v2.sub(v);
           
View Full Code Here

                            y2 = pol.ypoints[1];

                            Vektor2D verschOrtho = new Vektor2D(x1, y1);
                            verschOrtho.sub(new Vektor2D(x2, y2));
                            Vektor2D verschPar = new Vektor2D(verschOrtho);
                            verschPar.normal();
                            verschPar.mult(30);
                            verschOrtho.ortho();
                            verschOrtho.normal();
                            verschOrtho.mult(-10);
                            Vektor2D versch = new Vektor2D(verschPar);
View Full Code Here

            Vektor2D v = new Vektor2D(x2, y2);
            double dist = new Vektor2D(x1, y1).distanz(new Vektor2D(x2, y2));
           
            v.sub(new Vektor2D(x1, y1));
            v.normal();
            v.mult(this.pfeilSpLaenge);
            Vektor2D v1 = new Vektor2D(x1, y1);
            Vektor2D v2 = new Vektor2D(x2, y2);
            v2.sub(v);
           
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.