curved and oblique lines

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
Andrew

curved and oblique lines

Post 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 ?
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

No, not on a computer screen as it's made up of "squares" called Pixels
I have left this dump.
matt

Post 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
RayBritton
Veteran
Posts: 109
Joined: Thu Feb 10, 2005 12:38 pm

Post by RayBritton »

about 5000 by 5000 pixels should do for a perfect circle
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post 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.
I have left this dump.
User avatar
matt2jones
Veteran
Posts: 80
Joined: Sat Feb 19, 2005 8:29 am
Location: elsewhere
Contact:

Post 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
Do not mistake Apathy for feeling Content.

http://www.disjointed.cjb.net - Short Storys
http://matt2jones.deviantart.com - Random Art
http://www.freewebs.com/matt2jones - WebComic
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post 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:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
Dr_D
Veteran
Posts: 58
Joined: Fri Jun 17, 2005 4:47 pm
Contact:

Post 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.
The Dr. is INsane!!!
User avatar
matt2jones
Veteran
Posts: 80
Joined: Sat Feb 19, 2005 8:29 am
Location: elsewhere
Contact:

Post 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?
Do not mistake Apathy for feeling Content.

http://www.disjointed.cjb.net - Short Storys
http://matt2jones.deviantart.com - Random Art
http://www.freewebs.com/matt2jones - WebComic
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

yes, it is. that is what really sucks about SCREEN 13.
Image
Post Reply