Examples of rotate()


Examples of javafx.scene.canvas.GraphicsContext.rotate()

        final Point2D         CENTER       = new Point2D(BOUNDS.getWidth() / 2, BOUNDS.getHeight() / 2);
        final double          RADIUS       = Math.sqrt(BOUNDS.getWidth() * BOUNDS.getWidth() + BOUNDS.getHeight() * BOUNDS.getHeight()) / 2;
        final double          ANGLE_STEP   = 0.1;
        final GradientLookup COLOR_LOOKUP = new GradientLookup(STOPS);
        CTX.translate(CENTER.getX(), CENTER.getY());
        CTX.rotate(-90 + ROTATION_OFFSET);
        CTX.translate(-CENTER.getX(), -CENTER.getY());
        for (int i = 0, size = STOPS.length - 1; i < size; i++) {
            for (double angle = STOPS[i].getOffset() * 360; Double.compare(angle,STOPS[i + 1].getOffset() * 360) <= 0; angle += 0.1) {
                CTX.beginPath();
                CTX.moveTo(CENTER.getX() - RADIUS, CENTER.getY() - RADIUS);
View Full Code Here

Examples of lejos.nxt.Motor.rotate()

      else inside.backward();
      return;
    }
    float rotAngle  = angle*_trackWidth*2/(_wheelDiameter*(1-steerRatio));
    inside.rotate(_parity*(int)(rotAngle*steerRatio),true);
    outside.rotate(_parity*(int)rotAngle,true);

    busyWait();
    inside.setSpeed(outside.getSpeed());
  }

 
View Full Code Here

Examples of lejos.robotics.TachoMotor.rotate()

      return;
    }
    float rotAngle = angle * _trackWidth * 2
        / (_leftWheelDiameter * (1 - steerRatio));
    inside.rotate(_parity * (int) (rotAngle * steerRatio), true);
    outside.rotate(_parity * (int) rotAngle, immediateReturn);
    if (immediateReturn) {
      return;
    }
    while (inside.isMoving() || outside.isMoving())
      // changed isRotating() to isMoving() as this covers what we need
View Full Code Here

Examples of net.br410bury.graphics.GraphicsMatrix.rotate()

  {
    GraphicsMatrix g = new GraphicsMatrix();
   
    for(int ch = channels.length-1; ch >= 0; ch--)
    {
      g.rotate(motion.getChannel(frame, ch) * Math.PI / 180, channels[ch]);
    }
   
    return g;
  }
 
View Full Code Here

Examples of net.sf.fysix.math.Vector2d.rotate()

  private double throttle(double speedW, double strafeW, double rotateW) {
    double targetSpeed = getTargetSpeed();
    double targetStrafe = getTargetStrafe();
    double targetAV = getTargetAngularVelocity();
    Vector2d v = getVelocity();
    v.rotate(-getRotation());    // Make velocity relative to the ships orientation (x=forward, y=starboard)
    double speed = v.getX();
    double strafe = v.getY();
    double tots = v.length();
    double av = getAngularVelocity();
    if (Math.signum(speed * speedW) > 0) {  // Are we moving in the direction of this engines thrust?
View Full Code Here

Examples of net.sf.latexdraw.parsers.svg.SVGMatrix.rotate()

  @Test
  public void testRotate() {
    SVGMatrix m = new SVGMatrix();
    double angle = 0.14;

    m.rotate(angle);
    assertEquals(m.getA(), Math.cos(angle), 0.0001);
    assertEquals(m.getB(), Math.sin(angle), 0.0001);
    assertEquals(m.getC(), -Math.sin(angle), 0.0001);
    assertEquals(m.getD(), Math.cos(angle), 0.0001);
    assertEquals(m.getE(), 0., 0.0001);
View Full Code Here

Examples of nu3a.math.N3Matrix4D.rotate()

        matrix.mult(scaleMatrix);
        needScale = false;
      }
      if (needRotation) {
        N3Matrix4D rotationMatrix = new N3Matrix4D();
        rotationMatrix.rotate(angle, rotation);
        matrix.mult(rotationMatrix);
        needRotation = false;
      }
      if (needTranslation) {
        N3Matrix4D translationMatrix = new N3Matrix4D();
View Full Code Here

Examples of org.antlr.xjlib.appkit.gview.base.Vector2D.rotate()

            return;

        Vector2D v = direction.copy();
        v.setLength(length);

        v.rotate(angle*0.5);
        g.drawLine((int)anchor.getX(), (int)anchor.getY(), (int)(anchor.getX()+v.getX()), (int)(anchor.getY()+v.getY()));

        v.rotate(-angle);
        g.drawLine((int)anchor.getX(), (int)anchor.getY(), (int)(anchor.getX()+v.getX()), (int)(anchor.getY()+v.getY()));
    }
View Full Code Here

Examples of org.apache.batik.ext.awt.g2d.GraphicContext.rotate()

    }

    public void testSVGTransform() throws Exception {
        GraphicContext gc = new GraphicContext();
        gc.translate(20, 20);
        gc.rotate(Math.PI/4);
        gc.shear(.5, .5);
        gc.scale(20, 20);

        AffineTransform txf = new AffineTransform();
        txf.translate(60, 60);
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.threed.Plane.rotate()

        Vector3D p2 = new Vector3D(3.4, -5.8, 1.2);
        Vector3D p3 = new Vector3D(-2.0, 4.3, 0.7);
        Plane    p  = new Plane(p1, p2, p3, 1.0e-10);
        Vector3D oldNormal = p.getNormal();

        p = p.rotate(p2, new Rotation(p2.subtract(p1), 1.7));
        Assert.assertTrue(p.contains(p1));
        Assert.assertTrue(p.contains(p2));
        Assert.assertTrue(! p.contains(p3));

        p = p.rotate(p2, new Rotation(oldNormal, 0.1));
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.