Search code examples
resolutionpixelgeometry

What exactly is computer resolution?


Maybe It's a bit trivial question, but I am confused over the computer resolution. What is it?

If the resolution is say 150 X 100 then does it mean that 150 pixels will cover up the entire length of my system, (horizontally). And does it mean that the size of a pixel is not fixed? Since 300 X 200 will mean 300 pixels covering the same length.

Also, say I take up a pixel and draw a circle around it. Now is it possible that the circle passes through the centre of all the pixels it covers, or there will/can be some pixels for which the boundary does not pass through the centre. [Passing from the centre as in, if I take the extreme point on the diameter,for that the boundary passes through the centre. So like that].

That is, Can I say that taking up a pixel, if it is inside the circle or outside? [Again, the extreme point on the diameter is inside].

EDIT Also, In a normal X-Y axis; the points on the boundary are in decimals too, but if I consider the indices of pixels, in a window, then it will increase as a unit value only. So how do we decide, what all pixels get coloured when drawing a circle?


Solution

  • When you read 1024x768 1024 is the horizontal resolution and 768 is the vertical resolution in pixels.

    A Pixel can be a square or an rectangle, its not specified.

    To determine if a pixel is inside a Circle, you (simplified) calculate the distance of the center of that pixel to the center of the circle and check if it is below or equal the radius, if it is, it is inside.