Function exteriorIntegerPoints

  • Yields the points making up the exterior (ie. circumference) of the circle. Uses Midpoint Circle Algorithm

    Parameters

    Returns IterableIterator<Point>

    const circle = { x: 100, y: 100, radius: 50 }
    for (const pt of Circles.exteriorIntegerPoints(circle)) {
    // Fill 1x1 pixel
    ctx.fillRect(pt.x, pt.y, 1, 1);
    }