http://yuri.is/scribbles/venndiagrams/

#1 vinchuco:
Correction to title: Drawing ProportionalIntersection Venn Diagrams
This seems to be only for two circles.
I was hoping for an algorithm for drawing any Venn Diagram. Here's n=7 https://78.media.tumblr.com/tumblr_m74i4eR9Ym1qa0uujo1_1280....
Might not be the most efficient way to get proportionality, but it would seem that making the set boundaries elastic and putting a proportional amount of nonoverlapping particles within the corresponding regions may draw a 'good enough' picture.
Sort of like in the type of graph layout algorithm https://youtu.be/_Oidv5Mfuw
I find this kind of physical approach to 'optimization' entertaining. With quotes because it need not converge/terminate.
In the book "The Mathematical Mechanic" by Levi, there's even more examples like a physical model for solving an optimal location problem in 2D (minimize sum of distance from a source to fixed locations, choosing where to place the source) by setting up weights connected by strings to a ring denoting the optimal location of the source. It also claims to prove the Pythagorean theorem by a prismshaped water tank construction.

#2 benfrederickson:
Neat demonstration!
A while back I wrote a small package in Javascript for computing area proportional Venn and Euler diagrams: https://github.com/benfred/venn.js . The 2 circle case here is relatively easy, but the problem gets tricky when you have 3+ sets. I wrote up my approach here https://www.benfrederickson.com/venndiagramswithd3.js/ and https://www.benfrederickson.com/bettervenndiagrams/

#3 saagarjha:
I find it interesting that the function doesn't have a closed form solution, given how easy it is to compute it. I wouldn't have thought, at first glance, that the function wasn't invertible.

#4 tejtm:
I used "Area Proportional Ellipses" several years back which allowed up to three quantities to be represented.
http://www.eulerdiagrams.org/eulerAPE/
I made multiple highly precise comparison figures...
In the end someone (else) went into a paint program slapped a few ovals together as a cartoon of my precision which went into the final product because it did made a better illustration and conveyed to point of my figures without any accuracy beyond that of the mark1 eyeball

#5 nayuki:
You don't need 100 iterations of binary search. Doubleprecision floatingpoint numbers only have 52 bits of precision.

#6 jessriedel:
Nonprogrammer here. Isn't numerically inverting an analytic function something that should be done with a math library rather than coded from scratch? (Or is the point of this demonstration how to do that inversion rather than anything about Venn diagrams?)

#7 askvictor:
The code is neat, but given how terrible humans are at comparing areas[1] (particularly odd shapes like this), is there any point to making Venn diagrams proportional (other than filling your own deep OCD desires)?
1: See also: Pie charts

#8 alokg:
See also: Matplotlib Venn [1, 2] which draws areaaccurate Venn diagrams.

#9 dghf:
In the extremes (0% and 100% overlap), don't these cease to be Venn diagrams? I thought a Venn diagram had to show every possible intersection and nonintersection, even if some of these were empty.

#10 ape4:
Off topic a bit... what about those pie charts that are missing the middle. Are they proportional? Edit: seem to be called donut charts.