How to code this shape?

Hi,
I’m practicing a sketch on p5.js. I have attached below a small cropped portion of the complete image. I want to draw the highlighted image. If I use ellipse function, it fills color on the inside portion of the ellipse. Rather I want it on the outer region. I don’t want to use the background() function, as the complete picture is different. Is there any other way to code this?

Thank you for your time :slight_smile:
Capture

Two ways to approach this problem:

  1. draw your region with curves:
    https://p5js.org/learn/curves.html
  2. subract from area you want with an ellipse using a mask:
    https://p5js.org/reference/#/p5.Image/mask
    https://p5js.org/examples/image-alpha-mask.html
1 Like