// If any of the six joint angles have changed the result matrix is calculated
  // Any joint angle changes are stored in the transformation matrices
  // Method returns true if any angle has been changed
  public boolean calcEndCoordinates(Properties p) {
    // indicates whether an angle changed
    angleChanged = false;

    // check if angle for each joint has changed. If yes, calculate the new matrix
    if (t1.getTheta() != p.getValueJoint1()) {
      t1.changeTheta(p.getValueJoint1());
      angleChanged = true;
    }

    if (t2.getTheta() != p.getValueJoint2()) {
      t2.changeTheta(p.getValueJoint2());
      angleChanged = true;
    }

    if (t3.getTheta() != p.getValueJoint3()) {
      t3.changeTheta(p.getValueJoint3());
      angleChanged = true;
    }

    if (t4.getTheta() != p.getValueJoint4()) {
      t4.changeTheta(p.getValueJoint4());
      angleChanged = true;
    }

    if (t5.getTheta() != p.getValueJoint5()) {
      t5.changeTheta(p.getValueJoint5());
      angleChanged = true;
    }

    if (t6.getTheta() != p.getValueJoint6()) {
      t6.changeTheta(p.getValueJoint6());
      angleChanged = true;
    }

    if (angleChanged) calcResult(p);

    return angleChanged;
  }