I am hoping to draw an “ellipse with a bite out of it”, like pictured:
This one I created by brute-force (code below) but in general this is not a great approach.
#import "@preview/cetz:0.4.2": *
#canvas({
    import draw: *
    arc((0,0), start: 30deg, stop: 330deg, radius: (2,1), name: "O", anchor: "origin")
    hide({
      circle((2,0), radius: 0.58, name: "A")
    })
    intersections("OA", "O", "A")
    arc-through("OA.0", "A.west", "OA.1", name: "OA-arc")
})
I have tried a few approaches using get-ctx to compute the angle from the origin to the intersection points of the smaller circle, but have not had a single approach create the arc I would expect.
Is it possible to take two intersecting ellipses, and create this shape from them?
Thank you in advance for any help!
As a final example, this code does not behave how I would expect at all, even when handling a simple case of horizontal ellipses.
#canvas({
  import draw: *
  circle((0,0), radius: (2,1), name: "O", update-position: false)
  circle("O.east", radius: 1, name: "A", update-position: false)
  intersections("OA", "O", "A")
  arc-through("OA.0", "A.west", "OA.1", stroke:color.blue, mode: "PIE", update-position: false)
  arc-through("OA.0", "O.west", "OA.1", radius: (2,1), stroke: color.red, mode: "PIE", update-position: false)
})
Unfortunately, I do not still have my example where I tried to use get-ctx, but they produced similar results to above.





