code: public static void computePosition (
          Point center, double xradius, double yradius, double angle, Point pos)
      {
          pos.x = (int)Math.round(center.x + xradius * Math.cos(angle));
          pos.y = (int)Math.round(center.y + yradius * Math.sin(angle));
      }
docs: Computes the position of an entity along the path defined by the supplied parameters
  assuming that it must finish the path in the specified duration (in millis) and has been
  traveling the path for the specified number of elapsed milliseconds.