Why cannot a computer draw a line that isn't horizontal or vertical?

Dec 3, 1999
80
0
0
This is something I've been wondering about for ages and have in my own mind
come up with no satisfying explanation. Why is it that when a line is drawn on the screen
that is not horizontal or vertical it becomes all jagged?
Anti aliasing of course helps but that's just faking it... what is it that makes drawing a line
so complicated or is it a problem with the displays rather than other hardware???
Why, oh why?
Makes no sense to me so lets hear you experts and don't be afraid to explain it
even if it's complicated.
Thanks.
 

darth maul

Platinum Member
Oct 11, 1999
2,392
0
76
That would have to do with lines of resolution and pixel size. Think of it this way, if your screen was made up of 9 HUGE pixels and only _9_. Lines going left to right, or up and down would be appear to be straight, but that diagonal line would have to be made from three squares, in a step formation, thus jaggies. IF we ever get to monitors and video cards and programs that support resolutions with addressable microscopic pixels, well you will see a straight line.
 
Dec 3, 1999
80
0
0
I still don't believe that a line could not be drawn "straight"
when drawing it at some other degree than 90 or 180.
Why not just make the pixels rotate to the required degree so that
the line would not be jagged? This obviously would be more difficult
than just using the pixels as they are, but it should be possible, right?
Or when drawing a circle have the pixels rotate and overlap each other...
I mean this should be possible to happen without having it interfere
with the rest of the screen... just spin the darn cubes in an application window.
Perhaps I am just missing something but I am not yet convinced it couldn't be done :)


 

Mday

Lifer
Oct 14, 1999
18,646
1
76
pixels can't rotate, it's FIXED on the CRT.

screens are made up of tiny rectangles, or other polygonal shapes which define a dot on the screen of the monitor. (note dot pitch)

also, it depends on the resolution of the screen being displayed.

look at the screen with a magnifying glass.

I mean, look at the game boy, you can see the pixels of the LCD easily.
 

Donut

Junior Member
Jun 22, 2000
5
0
0
Yes, it is called vector graphics. Is anyone here old enough to remeber arcade games like Battlezone or Asteroids (the original versions from the late 70's and early 80's)? Those were done using vector graphics. The problem was you couldn't get color with a vector graphics tube. Although, some game makers got around that by applying colored film to screen.

I think because colored phospers are arranged in a grid-like pattern on your screen, the electron beam has to scan in that pattern to achieve accurate color.
 
Dec 3, 1999
80
0
0
Vectrex?
I remember Vectrex.
A friend of mine had one. It was amazing.

Still I go on... maybe I am starting to show my own stupidity here
but that's what this forum is here for.
One can zoom a pixel in an application so that it's made of several dots on the tube...
why cannot the pixel be modified when zoomed? I mean the tube might not display it
correctly when it's no longer zoomed but as long as zoomed it could be
rotated, cut etc... ???
By now I guess this cannot be done, but, but, but... it would make more precise
displaying of the line if the pixels could be manipulated when zoomed.
Though in this case the "pixel manipulation" would hardly make sense.
 

Mday

Lifer
Oct 14, 1999
18,646
1
76
that would require some extra processing, maybe fractals can be applied.

if you zoom into a CAD drawing, the line is redrawn.
 

bluemax

Diamond Member
Apr 28, 2000
7,182
0
0
Anyone remember this game from the arcade?

Major Havoc
(little spaceguy running around a maze to blow up the reactor and get out in time)

*Colour* vector graphics! :)
 

K_Factor

Senior member
Oct 10, 1999
359
0
0
Assume you have a resolution of 20 by 10, represented by the dots below. The 0's below represent all possible pixel possitions that can be used to display an image.

00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000
00000000000000000000

Now, assume that there are 4 strait lines and 2 diagonal lines drawn on the screen represented by the 0's.

00000000000000000000
00----------------------------00
0-0--------------------------0-0
0--0------------------------0--0
0---0----------------------0---0
0----0--------------------0----0
0-----0------------------0-----0
0------0----------------0------0
0-------0--------------0-------0
00000000000000000000

Antialiasing works to eliminate jaggies, but there is only so much it can do. Once the limits of a certain reslution are reached, nothing else can be done. 4x antialiasing does show that there was some room for improvement, because many people say it looks good at 800x600. Notice the jaggies of the diaginal lines.

Edit.
I don't know why multiple spaces between characters are removed.:|
 
Dec 3, 1999
80
0
0
Thanks guys.
I guess it all was just too obvious for me to fully understand. ;)
Nice 'drawing' there K_Factor.
Seems like what we really need is resolutions like 5120x3840 and higher to get rid of them
jaggies I so much despise...