I am struggling to understand an equation given in an academic paper (in atmospheric sciences/geography) that I am reading. The paper defines a line, called the Clear Line, which is derived through linear regression of a number of points. They state that
the transformation that quantifies the perpendicular displacement of a point from this line with be given by: $d = x \sin \theta - y \cos \theta$, where $\theta$ is the slope angle of the line.
I understand this to mean that the given equation should tell me the perpendicular distance from the point to the line. I have two problems: I can't see how this works, and it gives me different answers to other formulae that I do understand.
The diagram below shows a point (A) and two lines, $y = x$ and $y = x + 6$. Obviously the distance from the point (the dotted line) should be longer for $y = x + 6$ than it should be for $y = x$, but the formula given in the paper gives the same result for both. Of course this is the case, as the formula takes into account three of the four variables involved (gradient of the line and x and y locations of the point, but not the y-intercept of the line).
So, I have two questions:
Am I correct in stating that the formula given in the paper does not calculate the distance from the point to the line.
Given that it doesn't do that - what does it do? I assume it does something relevant (either that or the paper is completely wrong!) - but I can't seem to work out what it does by using trigonometry, constructing various triangles, and trying to understand where the equation came from - but I can't work it out!. It does seem to produce an answer that is vageuly related to the direction (if we just look at lines of different gradients - ignoring the intercepts - it seems to give a result which is related to the distance from the line).
Any ideas would be much appreciated!