I have a question i am stuck on in my maths class. I am going to change the numbers so i can figure it out this example myself.
Need to get the distance between the two pixels calculated.
Thanks for the help
Thats 100" diagonal and 1920 pixels across and 1080 going up.
My interpretation of the question is to compute the distance between the centres of two pixels diagonally opposite each other. Clearly the answer should be slight smaller than 100".
Assuming each pixel is a square of side $p$, then Pythagoras gives $p = {100 \over \sqrt{1024^2+768^2}} = {100 \over 1280}$ inches.
The coordinates of the centre of the lower left pixel are $(x_1,y_1)=({1 \over 2}, {1 \over 2})p$, the coordinates of the centre of the upper right pixel are $(x_2,y_2)=(1024-{1 \over 2}, 768-{1 \over 2})p$.
Hence the distance $d$ between the centres is $d=\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2} = (\sqrt{1023^2+767^2})p$, which is $d = 100 { \sqrt{1023^2+767^2} \over \sqrt{1024^2+768^2} } \approx 99.81$ inches.
Addendum: It seems that this is not what the OP was asking.
The distance between the centres of the pixels at $(m_1,m_2)$ and $(n_1,n_2)$ (the coordinates are integers) will be given by
$(\sqrt{(n_1-m_1)^2+(n_2-m_2)^2} ) \cdot p$ inches, where $p = {100 \over 1280}$ inches.