Qbasicnews.com

Full Version: PSET Circle!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
I made mine into a function. The actual functional code is only the 3 lines in the loop:

Code:
screen 12

declare sub psetcircle(x, y, r, c)

for r = 1 to 200 step 1
    psetcircle 320, 240, r, (r mod 15) + 1
next r

sleep


sub psetcircle(x,y,r,c)
    dim o as double
    for o = 0 to 360 step 30/r
        pset(cos(o*3.141592/180)*r+x, sin(o*3.141592/180)*r+y), c
    next o
end sub
(FB)
looking at these progs (endless ones all the same) it's like the Bresenham algorithm had never been discovered. Look it up its quick and always using the max screen resolution available.
I have a copy of the Bresenham algorithm but I can't figure out how to put limits into it, here is the area of the drawing area: (40,2) to (55,17), the circle can range in size from 1 - 24 and color can range from 0 - 255 and having an option to fill or not fill would be nice too. The circle is base on user input and is drawn relative to the relative position being (x%,y%).
Quote:looking at these progs (endless ones all the same) it's like the Bresenham algorithm had never been discovered. Look it up its quick and always using the max screen resolution available.


Way too easy. The point was to make something unique. Wink


btw: Screen resolution has nothing to do with any Bresenham algo, ya know? :lol:
What about my problem... *sniffle* *sniffle*, lol, maybe that's what Z!re meant when he said that I was self-absorbant, but it's not like I am pushing anyone right???
Give it a try first, and people will be more enthused about helping you. Wink
Pages: 1 2 3 4 5 6 7