The house can be drawn using several LINE statements.
One LINE statement will be used for each for the two sides, the floor and ceiling of the house. Remember that the LINE statement looks like this:
LINE (startX, startY)-(endX, endY)
(startX, startY)
is one end
of the the line and (endX, endY)
is
the other end.
' House Picture ' ' Start Graphics SCREEN 12 ' Draw the House ' Draw the Walls LINE (150, 320)-(150, 200) LINE (320, 320)-(320, 200) ' Draw the Floor and Ceiling LINE (150, 320)-(320, 320) LINE (150, 200)-(320, 200) ' Draw the Roof LINE (150, 200)-(235, 100) LINE (320, 200)-(235, 100) ' Draw the Tree ' Draw the Trunk ' Draw the Leaves ' Draw the Grass END
The picture shows what the program draws (in white) along with some red lines to that show the screen as graph paper. Recall that the X coordinate starts at zero at the left edge and increases going right. It ranges from 0 to 639.
The Y coordinate starts at zero at the top edge and increases going down. It ranges from 0 to 479.
What is the (X, Y) coordinate of the peak of the roof? (You can read this off the graph paper, or look at the program for the exact value.)