Use the intersections(with:) method on a BezierCurve to find where it intersects another curve. This returns an array of Intersection objects.
Each Intersection object contains:
t1: The t-value on the original curve (self).t2: The t-value on the passed curve.
You can resolve these t-values into CGPoint coordinates using the point(at:) method.
For cubic curves, you can also use selfIntersections() to find where a curve intersects itself.
let intersections: [Intersection] = curve1.intersections(with: curve2)
let points: [CGPoint] = intersections.map { curve1.point(at: $0.t1) }
Draw.drawCurve(context, curve: curve1)
Draw.drawCurve(context, curve: curve2)
for p in points {
Draw.drawPoint(context, origin: p)
}