# How the calculate distance of light source

Is it possible to calculate the distance of a light source from say position x? I have tried searching for material on this, but I mainly came up with calculating by luminescence (which isnt exactly what i was looking for).

How can something like this be done?

• You'll need to expand your question a bit to explain exactly what it is you're trying to do. If your light source is a point source (or effectively a point source) and you have no information about the intensity or modulation of the light there is no way to calculate its distance. Calculating distance requires extra information about the source, so you'll need to tell us what sort of extra information you have. – John Rennie Sep 27 '17 at 7:26
• @JohnRennie: …except if you have a background and two eyes (or cameras), and the source is not too far away, in which case you may use the parallax method. – pela Sep 27 '17 at 7:31
• Are you looking for the parallax formula? – safesphere Sep 27 '17 at 7:46
• Thank you for the name "Parallax" Let me look up how this can be done. – iOS Calendar patchthecode.com Sep 27 '17 at 8:16
• @JohnRennie I have a light bulb light source and 2 cameras. I just wanted to know if there was a way to calculate the distance of how far away the light source is from the cameras – iOS Calendar patchthecode.com Sep 27 '17 at 8:17

## 1 Answer

There are many ways to measure the distance of a light source. The principles used include:

1) parallax: if you can measure the direction of a source from two different positions, you can draw a triangle with the two measurement locations as the base and the source as the apex: the distance is then the length of the sides of the triangle (or the height which will be almost the same for small angles). This is the principle used for focus assistance (range finding) in older cameras - as you look through the viewfinder you see two overlapping images, one of which comes from an offset mirror. As you adjust the focus the two pictures overlap - that is when the angle of the mirror is set up so the parallax is corrected. I found a rather nice article about range finding with Leica cameras from which I borrow this diagram: 2) size: for some objects you may know the size - for example, the height of a light house. Measuring the apparent angle subtended from top to bottom of the light house with the use of a sextant (again a pair of mirrors that generate overlapping images, but this time calibrated to measure angle from the same point rather than parallax correction) one can deduce the distance as known height divided by apparent angle in radians (or $d=\frac{h*\pi}{180 a}$ where angle $a$ is in degrees). I found an article about the application of this trick

3) intensity: if you know the initial brightness of your source, measuring the actual intensity will allow you to deduce the distance from the inverse square law

4) focus: modern cameras have auto focus systems that adjust the focus of the lens until the contrast is as high as possible - knowing the position of the lens at which this occurs, you can use the lens equation to find the object distance. This works best for shorter distances.

5) interferometry: a source of known size that is VERY far away (so it looks like a point) represents an interesting challenge: using spatial coherence, you can determine the size using a setup with mirrors that might be kilometers apart - in effect giving you the spatial resolution of a huge lens without having to build a complete lens (two flat mirrors that are a kilometer apart are less challenging than a one km diameter mirror ground to a precision of a fraction of a wavelength over its entire surface...)

There are other methods too...

• Thanks man. This explains exactly what i was looking for. #1 and #5 seems to explain what i need. – iOS Calendar patchthecode.com Sep 27 '17 at 15:08