Huh: a circle is always a circle, but a square is rarely a square...

Started by CharlieJV, Oct 27, 2022, 12:14 AM

Previous topic - Next topic

CharlieJV

How interesting is this:

The way wwwBASIC was setup, the CIRCLE command always produces a perfect circle regardless of screen mode (and differences in pixel width vs pixel height).

But such is not true for all things.  Boxes created with LINE, for example.

Pretty sure the same goes with other BASIC implementations (particularly those with roots in Microsoft BASIC?)  That might explain why some graphics programs don't use CIRCLE to improve performance?

Anyway, try this in BASIC Anywhere Machine to see what I mean:




' don't forget to tap on the screen to give the program keyboard focus
' tap on the keyboard to see the next screen mode.

do
    <$list variable="mode" filter="[enlist[0 1 2 7 8 9 10 11 12]]">
        screen _newimage(100, 100, <<mode>>)
        line (2,2) - (97,97), 1, bf
        circle (50,50), 40, 0
        locate 2,3 : print "screen " + <<mode>>
        a$ = input$(1)
    </$list>
loop