5

I'm trying to figure out a formula on how to calculate the size of a distant object at a viewing pane closer to me. I'm sure I had this in high school, but I couldn't find any resources on what the correct calculation is.

I found the following page explaining the correct way to DRAW such a thing, but I don't see a fomula (e.g. size of object, distance): Calculating diminishing size in perspective. I also know I can calculate the angle of view, like shown in this angular size calculator - however this assumes a triangle, not a rectangle.

Pictures are worth more than words, behold for my drawing skills: Mind boggle

Explanation: How would I go about and calculate the size of the target, when looked at from the viewing pane (marked red). When you look through the scope, the target sure looks a lot smaller - how much smaller in terms of size/relation?!
Is it as simple as dividing 30cm/1000cm to know the size of the target at a distance of 10m? Don't I have to do some sin/cos kung-fu? What about the scope of 2cm, assuming it is my entire field of view - it surely must go somewhere in the equation.

I'm not trying to reinvent the wheel here and all ego shooter do this already automatically, but I just can't figure out a reference to the correct formula, some pointers? I'm looking for the size of the target in the scope, either in absolute numbers (5mm) or in relative numbers assuming the scope is 100% of the field of view, the target will take up 1/10th of the scope's field of view.

grapefrukt
  • 27,016
  • 6
  • 49
  • 73
Dennis G
  • 21,405
  • 19
  • 96
  • 133

1 Answers1

4

No trig but to do it properly you will need Pythagoras.

See the scaling at the end of: http://en.wikipedia.org/wiki/3D_projection#Perspective_projection

You scale according to ratios of distances from the eye to the screen (assumed to be a constant), and the distance from the eye to the object being drawn. This latter measurement is calculated with Pythagoras (the hypotenuse of the triangle formed by your 10m and 30cm, ie. Sqrt(10*10+0.3*0.3)

Note that by changing the eye to screen constant, you effective change the focal length of your 'camera'.

winwaed
  • 7,645
  • 6
  • 36
  • 81
  • 1
    I note that you also mention the scope's field of view. This cannot be determined without knowing the scope's optical parameters. Then things like the Lensmaker Formla could be applied if you really want to do it properly, but IMHO that is overkill to your problem. Also there is the problem of scope alignment. If parallel, then displacement of 2cm would work, but if the scope is set properly for a specific range will not be parallel. – winwaed Nov 25 '10 at 01:03
  • 1
    Yeah I know there are several things to consider besides the obvious (good thing you pointed out the Lensmaker formula!). I implemented something based on the 3D projection article on Wikipedia, was exactly what I was looking for. Thanks! – Dennis G Nov 25 '10 at 11:29