code: public double squaredDistanceFromCamera(double x, double y) {
      double dx = (distance * sinZ) - x;
      double dy = (distance * -cosZ) - y;
      return dx * dx + dy * dy;
    }
docs: Distance from camera
  
  @param x X position
  @param y Y position
  @return Squared distance