Page 1 of 1

curved and oblique lines

Posted: Wed Oct 19, 2005 8:09 am
by Andrew
does it exist a way to draw a perfect circle (at least apparently) without any deformation,distorsion etc? Same for any line not horizontal ?

Posted: Wed Oct 19, 2005 9:29 am
by Z!re
No, not on a computer screen as it's made up of "squares" called Pixels

Posted: Wed Oct 19, 2005 12:38 pm
by matt
Yeah, the distortions your talking about are due to the pixels, but...

There are ways to minimise those distortions, by means of vector graphics, where instead of an array of dots being recorded, the equation of the curve is recorded, and can then be used to produce graphics of the maximum acurasy available to your output device (printer/screen etc)... This is probably what your looking for, and that's all I know about the subject, so you'll have to research it further yourself/ask someone else for more information...

You could also just up the resolution a fork-load so no-one would notice.

matt

Posted: Wed Oct 19, 2005 2:13 pm
by RayBritton
about 5000 by 5000 pixels should do for a perfect circle

Posted: Wed Oct 19, 2005 3:02 pm
by Z!re
RayBritton wrote:about 5000 by 5000 pixels should do for a perfect circle
No, because it would be made up of squares.

There's no such thing as a perfect circle on a computer screen. It's impossible to achieve.

Posted: Thu Oct 20, 2005 10:04 am
by matt2jones
or rectangly shaped things...


Really theres are no perfect circle's in reality at all, so the question of whether you can make it on a computer screen is a moot point...

matt

Posted: Thu Oct 20, 2005 3:58 pm
by Rattrapmax6
I think he means over all? In which case the righer the res the smaller the square pixels thus getting a smoother looking line to the untrianed eye... Only ones looking for the blocks with find them....

:wink:

In anywhich case... FreeBASIC..? :roll:

Posted: Fri Oct 21, 2005 1:08 am
by Dr_D
You could also run some antialiasing passes. Basically, it just "blurs" the jagged lines with whatever color is already in the screen buffer... or on the screen.

Posted: Fri Oct 21, 2005 4:48 am
by matt2jones
And no-one would be able to look at the screen without tearing their retina because they can't stop their eyes from rolling uncontrollably towards or away from each other trying to focus on the line....

Or maybe I just have a problem....

The antialiasing is probably the best aproximate solution to your problem... Though it is physically unsolvedable...

matt

PS: And incase no-one said this before, pick a screenmode where the pixels are square, or it will warp... Y:X = 75:100 I think... Isn't 320x240 square pixel mode?

Posted: Fri Oct 21, 2005 8:30 am
by {Nathan}
yes, it is. that is what really sucks about SCREEN 13.