i derived this equation before. the formula is just an approximation for small angle case, where [itex]sin\theta=tan\theta[/itex] for small angle. i.e. it is for the case where you almost look vertically down to the object from above. you can derive it easily by drawing slender triangles. very easy.

The triangles are NOT similar. That derivation is just extremely poorly worded (or was written by someone who knew the result and "made up" the proof). What it is actually using is the small angle approximation that sniffer mentions.