Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alternate way to draw a circle
#9
Well I am using fb and this is what I did:

Code:
Declare Sub DrawEllipse (x AS INTEGER, y AS INTEGER, xr AS INTEGER, yrAS INTEGER, colour AS INTEGER)

Screen 13,,,1

DrawEllipse 160, 100, 80, 60, 15
Sleep

SUB DrawEllipse (x AS INTEGER, y AS INTEGER, xr AS INTEGER, yrAS INTEGER, colour AS INTEGER)
FOR xl = xr TO 0 STEP -1
  yl = SQR(xr * xr - xl * xl) * yr / xr: Y2 = yl
  DO
    Pset (x + xl, y + yl), colour
    Pset (x - xl, y + yl), colour
    Pset (x + xl, y - yl), colour
    Pset (x - xl, y - yl), colour
    yl = yl - 1
  LOOP WHILE yl > Y1
  Y1 = Y2
NEXT
END SUB
Reply


Messages In This Thread
Alternate way to draw a circle - by axipher - 12-13-2005, 07:15 AM
Alternate way to draw a circle - by yetifoot - 12-13-2005, 07:26 AM
Alternate way to draw a circle - by NecrosIhsan - 12-13-2005, 07:27 AM
Alternate way to draw a circle - by yetifoot - 12-13-2005, 07:33 AM
Alternate way to draw a circle - by axipher - 12-13-2005, 07:56 AM
Alternate way to draw a circle - by NecrosIhsan - 12-13-2005, 12:37 PM
Alternate way to draw a circle - by axipher - 12-13-2005, 08:07 PM
Alternate way to draw a circle - by na_th_an - 12-13-2005, 09:58 PM
Alternate way to draw a circle - by axipher - 12-14-2005, 07:06 AM
Alternate way to draw a circle - by yetifoot - 12-14-2005, 07:13 AM
Alternate way to draw a circle - by axipher - 12-14-2005, 07:33 AM
Alternate way to draw a circle - by axipher - 12-14-2005, 07:40 AM
Alternate way to draw a circle - by yetifoot - 12-14-2005, 07:46 AM
Alternate way to draw a circle - by axipher - 12-14-2005, 07:54 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)