I have experimental data, and I decided to present them in the form of sets.
Let's say there is a main set called E = {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s} (blue circle) and several subsets of B (red dotted ellipses), which comprise elements of a core set of E .
I need to represent these subsets in the main set E and show their intersections, more or less similar to the figure below.
This is why I need some algorithms (with an example) to draw this figure. Preferably in PHP or Javascript (using the SVG specification), because I'm going to implement this problem in a web application.

Thanks in advance!