Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Consider a square as rendered on a computer screen: its width and height are $N$ pixels each, and its area is $N^2$ pixels. Its diagonal, when measured in pixels, is also $N$ pixels long. If you double the number of pixels, the sides and diagonals will again be $2N$ pixels long. Obviously, this will never converge to $\sqrt2$.

I know I'm supposed to measure the diagonal length in terms of pixel diagonal length, but this only pushes the question one step back: how (from which limiting geometrical process) does $\sqrt2$ as the pixel diagonal length arise? Does there exist a discrete process, akin to the one described above, that converges to $\sqrt2$ in the limit?

share|improve this question
1  
The short answer is no. Speaking very roughly and intuitively, the successive approximations not only need to get close to the diagonal, they need to ‘flatten out’ more and more, so that their deviations from being parallel to the diagonal also approach zero. –  Brian M. Scott Feb 15 '12 at 7:58
    
But they lie on the diagonal! –  zvrba Feb 16 '12 at 7:15
    
The approximations that you’re measuring do not lie on the diagonal: they are the boundaries of the pixels, which are zigzags that touch the diagonal but certainly do not lie on it. –  Brian M. Scott Feb 16 '12 at 7:22
    
OK, I understand it now. –  zvrba Feb 16 '12 at 7:25
add comment

2 Answers

up vote 3 down vote accepted

Consider the plane ${\mathbb R}^2$ with points $z:=(x,y)$. The euclidean metric is given by $$d_{\rm eucl}(z,z'):=\sqrt{(x-x')^2+(y-y')^2}\ ;$$ it has the usual euclidean circle of radius $1$ as its unit sphere. On the other hand, your pixel counting corresponds to the so-called $l^\infty$-metric $$d_{\rm pix}(z,z'):=\max\{|x-x'|,|y-y'|\}\ ;$$ the unit sphere in this case is the square with vertices $(\pm 1,\pm1)$.

To measure the lengths of a curve $\gamma$, e.g., the diagonal of a large square, one divides the curve $\gamma$ into $N\gg1$ little "segments" and covers each segment with an appropriately scaled unit disk. (This is the idea of the so-called Hausdorff measure.) In this way, using $d_{\rm eucl}$ one finds that the diagonal of the unit square has length $\sqrt{2}$, and using $d_{\rm pix}$ instead one arrives at length $1$.

To put it differently: If your pixels were little circles that can be moved around at will, the limiting process you describe would give $\sqrt{2}$ as length of said diagonal.

Added later:

Both metrics induce the same topology (the "usual" topology) in the plane. A sequence $(z_n)_{n\geq0}$ converges to some point $z^*\in{\mathbb R}^2$ (or not) whether you measure distances by means of $d_{\rm eucl}$ or $d_{\rm pix}$. The essential difference between the two metrics is the following: Both metrics are translation invariant and behave in the expected way under scaling. But $d_{\rm eucl}$ is also invariant under rotation, which $d_{\rm pix}$ is not. As a consequence $d_{\rm eucl}$ allows of a much richer geometry (which you learn in high school) than $d_{\rm pix}$.

share|improve this answer
1  
I'm conjecturing a bit, but I bet it might even be true of squares too -- if you were allowed to rotate them. –  Hurkyl Feb 15 '12 at 10:06
1  
If you used the diameters of the disks to make your measurements. If you used the (semi-)circumferences in the way that the OP is using the boundaries of the pixels, you’d get a ‘length’ of $\frac{\pi\sqrt2}2$. –  Brian M. Scott Feb 15 '12 at 12:31
    
OK, after a bit of reading, I found out that metric induces a topology. Euclidean metric induces the "flat" topology of the plane, right? What kind of surface/topology is induced by the 1-norm? –  zvrba Feb 16 '12 at 7:24
    
@zvrba: See my Edit. –  Christian Blatter Feb 16 '12 at 9:00
add comment

The lenght of the diagonal is independent of the pixel grid. Moreover, the boundary of the approximating pixels after adding up has always the same length: (horizontal distance + vertical distance)*2. So "pixel distance" has little to do with "Euclidean distance".

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.