Rounded Corner

BlitzPlus Forums/BlitzPlus Programming/Rounded Corner

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Graphics 640,480,16,2
For x=0 To 128
For y=0 To 128
i=255-(Sqr((x*x)+(y*y))*2)
If i>0 Then Color i,i,i:Plot x+320,y+240
Next
Next
WaitKey
modify the i= line to
i=Sqr((x*x)+(y*y)) where i is the radius. This way you can do what you like with it! If you do a for x =-128 to 128 and the same on the y you'll get a circle.