The camera obscura.
Here is a room sized camera obscura from the 18th century. You can see the screen onto which the image is projected inside the room.
This image helps to explain how this works. The light from the top of the object outside the window travels down through the hole to the bottom of the wall opposite. Similarly, the light from the bottom of the tree appears projected at the top of the wall, making the image appear upside down. Artists discovered this phenomenon hundreds of years ago and used it to help them create realistic images of the outside worlds on a two dimensional surface.