Foliage



Eine gute Antwort wäre:

  • X: 200
  • Y: 45
  • width: 125
  • height: 55

Foliage

These values are defined as constants:

final int treeX = 200, treeY = 45, treeW = 125, treeH = 55;  // tree leaves

To add the foliage to the tree,
the following methods call will be added to the applet:

gr.setColor( Color.green );
gr.fillOval( treeX, treeY, treeW, treeH );

The fillOval() method is like the drawOval()
method, except that it fills the figure with the current color.

Next, look at the green lines that make up the rolling hills
in the background

(click here to see them).

Estimate an (X, Y) value for each line’s endpoints.
If a values already has a name, like houseX,
or can be calculated, do that.

FRAGE 7:


The first line (let us say) is the one on the left.
Fill in the blanks in the following.
(It might be a bit tedious to fill them all in, but try at least a few.)

  startX startY endX endY
line 1 L1X1: _______ L1Y1:_______ L1X2:_________ L1Y2: _______
line 2 L2X1: _______ L2Y1:_______ L2X2:_________ L2Y2: _______
line 3 L3X1: _______ L3Y1:_______ L3X2:_________ L3Y2: _______
line 4 L4X1: _______ L4Y1:_______ L4X2:_________ L4Y2: _______