# Escher-Penrose-Stairway

## The Penrose-Escher staircase - an apparent, geometric "perpetual motion machine"

Things are not what they seem. And sometimes this leads to problems because the anticipated shape of things are in conflict with one's own model of reality. M.C. Escher, inspired by the work of the theoretical physicist Roger Penrose, demonstrated this in a very impressive way with some of his graphics. Let's have a look at the well-known drawing "up stairs, down stairs"

Simple model of the Escher-Penrose staircase
Click and go straight to the simulation

A simplified representation of the Escher-Penrose staircase can be seen in the picture above: Four cuboid-shaped steps form a closed staircase, apparently "somehow" right-angled. If you follow the steps in one direction, they always seem to rise or always fall in the opposite direction. An imaginary ball would always roll down the stairs on these stairs, become faster ... an inexhaustible source of energy, a "perpetual motion machine". But that is not possible. So what's going on here?

### 1. Projection means loss of information

First of all, it should be emphasized that the visual impression of this drawing corresponds to that of a possible, actually existing object. You can actually build something like that and take a picture. It will look exactly like the drawing. The crucial point of a photo, a drawing or any two-dimensional representation of the three-dimensional world's object is that information about the actual shape of the object is necessarily lost. An infinite number of real objects can lead to the same optical impression on a two-dimensional image. As a simple example let's have a look at the illustration of a cube . A photo cannot say anything about the actual size of this cube. A large cube far away produces the same image as a small cube closer to the camera. I.e. an infinite number of real cubes of different sizes lead to the same photo.

### 2. Experience-based interpretation of visual impressions

Furthermore, we use ready-made interpretation patterns to classify images. Take a look at the following picture, a visualization of four cuboids in a computer model and obviously the representation of an ascending staircase.

Apparently rising, linear staircase with cuboid steps

If you see two cuboids in a picture that have an edge in common (in the projection), this perception is (mostly) interpreted in such a way that the edge also corresponds in the three-dimensional world, i.e. the cuboids directly touch one another. But this is also directly linked to the idea that there is a difference in height to be overcome from changing from one to the cuboid.

Another view of the same, apparent staircase arrangement with slightly offset camera positions

If you look at the above arrangement, but from a slightly different angle, you can see that the cuboids are offset and all lie on the base. They are not connected to each other, nor is there a difference in height from one cuboid to the next. The underlying object model is therefore not a staircase but only gives this appearance from a certain view point.

### Construction of the Penrose-Escher staircase

From the above, the following requirements for the construction of the Escher-Penrose staircase result: Create an apparently closed, circumferential arrangement of cuboids, whereby the edges of neighboring cuboids adjoin one another in the projection and thus give the impression of steps.

And what exactly does a construction process look like that positions the “actual” cuboids in a suitable manner in order to realize the corresponding edge overlaps in the projection?

Construction of the Escher-Penrose staircase

Four cuboids respectively their edges (blue, red, green, violet) are constructed on a base (top surface of a tower). For this purpose, four points k_1, k_2, k_3 and k_4 are selected on the edges of the base area at the same distance w_S from the corners. Each cuboid is defined by a “corner point” k_n and the opposite “corner point” k_ (n + 1). The cuboid height h is drawn in at each of the four corner points and the edges of the respective cuboid are then drawn using the rules of projective geometry. Note that in spite of the fact that all cuboids are at the same height, the impression of a rising or falling step arises when passing from one cuboid to the other. Essentially, this impression arises from the fact that the end point of the cuboid n at height h above the base area, corresponds to the starting point of the cuboid (n + 1) at height 0, in the projection, i.e. in the drawing. It is important to emphasize that this construction image depends largely on the selected position of the imaginary camera and changes with a new camera position.

Note: The above construction scheme leads to blocks of different lengths and widths. For the simulation shown below, the construction process was modified in such a way that the four cuboids have different lengths but the same width. Can you change the construction accordingly?

### An almost real Penrose-Escher staircase - an interactive computer model

Drawings always represent a snapshot of a scene from a certain perspective. The starting point for my interest in the Escher-Penrose staircase was to expand its idea in a way, that the illusion of the closed, rising staircase works for different view points by an algorithmically generated cuboid arrangement. By using WebGl respectively the THREE.js JavaScript Library, the virtual cuboid arrangement can then be visualized and displayed in the web browser. Depending on the camera position, a cuboid arrangement is generated according to the above construction scheme. If the camera position is changed, the algorithm creates a new cuboid arrangement of seemingly ascending or descending steps:
##### Control
The recalculation of the arrangement of the cuboids is switched off by deactivating the "Geometrie neu berechnen" checkbox. By changing the camera position you see the actual arrangement of the cuboids.