ANY-maze Help > Cameras and Videos > Lens calculations

Lens calculations

Introduction

To ensure that your apparatus will fit in your camera's field of view, you need to perform a simple calculation. This will tell you the minimum lens angle that you need.

Lens angles

Any lens has a value called its lens angle (sometimes also called its angular field of view) which essentially tells you how wide the camera's view is - see figure 1.

  

  

Figure 1. The lens angle alpha determines how wide the camera's field of view is.    

As you may realise, a lens might have a different lens angle in the horizontal and vertical planes and, in fact, there are three lens angles you might encounter - horizontal, vertical and diagonal, but the horizontal angle is the most commonly quoted. What's more, if you know one of them, you can make an approximate calculation of the others:

  

  Horizontal = Vertical / 0.75

  Horizontal = Diagonal x 0.80

These won't give exact answers but should be close enough for our purposes. Nevertheless, if at all possible, I'd suggest you try to find out the horizontal angle of any lens you want to use.

Calculating the required horizontal lens angle

Generally speaking, you'll be constrained to a minimum lens angle by the size of your apparatus and the height of the ceiling in the room you want to use. As you'd expect, the bigger your apparatus is, the further away from it the camera will have to be in order to see it all. However, if the camera reaches the ceiling and still can't see all the apparatus, then you'll need a wider angle lens - see figure 2.

  

  

Figure 1. With this lens, the camera can't see the entire open field. You'd need to move the camera up (which is likely to be difficult) or use a lens with a wider angle.

To calculate the lens angle, the first thing you need to do is to measure the distance from the camera lens to the surface of the apparatus, the width of the apparatus and the depth of the apparatus - we'll call these measurements a, b and c respectively and they should be in centimetres - see figure 3.

  

  

Figure 3. The three dimensions you need to measure to calculate the required lens angle for a piece of apparatus.

Next follow these steps:

 1.If c is greater than b then swap b and c 
 2.If c ÷ 0.75 is greater than b then make b = c ÷ 0.75 
 3.Multiply b by 1.1 
 4.Divide b by 2 
 5.Subtract the approximate height of the animal (when rearing) from a. For a rat, a value of 15cm is OK. 
 6.The required horizontal lens angle = arc tan (b ÷ a) x 2.  
 You can use the calculator that's part of Windows to calculate the arc tan. Open the calculator, which can usually be found on the Start menu under Programs - Accessories. Select the View menu, and if 'Scientific' isn't selected then select it. Calculate b ÷ a. Next ensure that the 'Degrees' option is selected, then check the 'Inv' box and finally click the 'tan' button. Don't forget that the final lens angle is this value multiplied by 2.  

  

Here's a worked example for a typical plusmaze, where: a = 200, b = 110 and c = 110.

    
 1. b and c are the same, so nothing to do 
 2. c ÷ 0.75 = 147   147 is greater than 110, therefore b = 147 
 3. b = 147 x 1.1 = 162 
 4. b = 162 ÷ 2 = 81 
 5. a = 200 - 15 = 185 
 6. Lens angle = (arc tan (81 ÷ 185)) x 2 = arc tan (0.438) x 2 = 23.5 x 2 = 47° 

We need a lens with a horizontal lens angle of at least 47°. In fact, in the 3rd step we added 10% to the value of b, giving us a little leeway in the minimum acceptable value for the lens angle - for example, a 45° lens would be fine.

  

Of course, if you're planning to use ANY-maze with different pieces of apparatus, a plusmaze and a Y-maze perhaps, then you should calculate the required lens angle for each of them and use a lens with at least the largest angle reported, although in this situation you'd probably do better to use a vari-focal lens.

Vari-focal lenses

If your budget will run to it, then without doubt the best type of lens to use with ANY-maze is a vari-focal lens. With these lenses, you can alter the lens angle and thus zoom in and out so your apparatus nicely fits the camera's field of view. This can be particularly important if you plan to use different apparatus, especially if they're dramatically different sizes. For example, if you have a fixed angle lens suitable for a rat water-maze, then if you put a mouse plusmaze under it, the apparatus will only fill a small part of the picture and the mouse itself will be tiny. Of course, even a vari-focal lens only has a range of lens angles (perhaps 35º-75º) so you should still check that your apparatus will fit it.

See also:

 •USB cameras 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T1331