0
 public static void filledTriangle(double x, double y, double length) {
        // add length / 2 to shift right the filled triangle
        double[] xArray = {
                x - length / 2 + length / 2,
                x + length / 2 + length / 2,
                x + length / 2
        };

        double[] yArray = { y + height(length), y + height(length), y };

        StdDraw.filledPolygon(xArray, yArray);
        StdDraw.filledPolygon();
    }

When I use length, x, y greater than 0 or 1, output image is not visible (or partly visible) on the screen?

I tried to read documentation for autoscaling, but there is no information on that. I am not allowed to use SetXscale and etc.

enter image description here

pmatatias
  • 3,491
  • 3
  • 10
  • 30

0 Answers0