• You can just use the library to draw an arc like this:

    g.clear();
    const GU = require("graphics_utils");
    let centreX = 0.5 * g.getWidth();
    let centreY = 0.5 * g.getWidth();
    let startAngle = GU.degreesToRadians(20);
    let endAngle = GU.degreesToRadians(135);
    let minRadius = 0.3 * g.getWidth();
    let maxRadius = 0.45 * g.getWidth();
    GU.fillArc(g, centreX, centreY, minRadius, maxRadius, startAngle, endAngle);
    

    Gordons code does very similar things by constructing a polygon that approximates the arc.


    1 Attachment

    • arc.png
About

Avatar for halemmerich @halemmerich started