Using a Pinhole to Get a Zoom/Wide Angle Effect
The pinhole camera works because light travels in straight lines, so we can look at this diagrammatically as:-
Getting a Zoom/Wide Angle Effect
We can also look diagrammatically at the effect of making the room or box longer or shorter and the effect it has on the image created.
So what can we see
If the distance between the pinhole and the focal plane increases then you will have more telephoto, if the distance is reduced the image gets wider.
As the distance increases the image gets dimmer, so add longer exposures to compensate, as the distance gets shorter the image is brighter so reduce the exposure time.
Putting this into practice
Using a tube set with three tubes, you have a range of 7 combinations to try, so taking away tubes or using thinner ones, decreases the distance, makes the images wider and brighter. Adding a tube or exchanging one for a thicker one.
With three tubes on you have quite a powerful telephoto effect, equivalent to around a 125-135mm with a DX camera. Remember the tubes are just spacers, they don't have any lens or glass in them, the total effect is created by the pinhole and the distance between the pinhole and the sensor.
If you wanted to, you could create a longer card tube and make extreme telephoto. Remember that like using a lens the longer the lens/tubes the more stability you need when using longer exposures to avoid camera shake.
Depth of field is not a problem
With pinhole photography, there is no depth of field, everything is as sharp as every other part. So you can have a flower in the foreground and castle in the background and they are both is focus. There are other solutions in normal photography without having to use pinholes to overcome this, but perhaps its just a little more fun to achieve this way, if we don't want a large quality image.
The two images below were taken to illustrate this effect, the image on the left is using a pinhole and three tubes, while the one on the right has had the largest tube removed. The camera was not moved.
You will see as expected the image on the right is a wider angle photo, but you may also notice that the image position has changed as if we had stood on the top of a pair of tall steps. The camera has not moved, but what has happened is that the pinhole was not exactly in the centre of the card and has twisted in the process of removing the tube element, producing an effect that we will look at in more detail in the article Using a pinhole to simulate the rising front on a camera.