• @JumJum ... or use this function to draw circle:

    function circle(xm, ym, r) {
          var x = -r,
            y = 0,
            err = 2 - 2 * r;
          do {
            g.setPixel(xm - x, ym + y);
            g.setPixel(xm - y, ym - x);
            g.setPixel(xm + x, ym - y);
            g.setPixel(xm + y, ym + x);
            r = err;
            if (r <= y) err += ++y * 2 + 1;
            if (r > x || err > y) err += ++x * 2 + 1;
          } while (x < 0);
    }
    

    The 'spikes' come from the optimized algorithm that can handle ellipses and circles incl. fill (4 auf einen Streich).


    1 Attachment

    • Bildschirmfoto 2019-12-05 um 17.56.24.jpg
About

Avatar for MaBe @MaBe started