Half a year later I can answer this myself.
The formula is
points = floor(conversionFactor * (result + resultShift)^2 + pointShift)
And all the smarts are within knowing the coefficients. But let's start with something simpler to understand what's going on.
Track events
In track events the result is measured against a reference time. Your improvement with respect to the reference is then squared and multiplied by a certain factor that converts squared seconds to points.
Example
Let's consider 100m in outdoor for men. The reference time for this event is 17 seconds in the 2017 edition.
Suppose John ran the distance in 11.78 seconds. That is 5.22 seconds better than the reference time. John's result is thus equivalent to 24.63 * 5.22^2 = 952 points (just drop the digits following the decimal point at the end). The 24.63 is a coefficient specific to this event.
The formula for track events can be expressed like this:
points = floor(conversionFactor * (reference - result)^2)
General formula
The other events have one more event-dependant coefficient.
But first, the result is shifted by a number (similar to comparing with reference in track events).
The shifted result is then squared and multiplied by a factor. And this is then shited by another number.
The formula can be expressed like this:
points = floor(conversionFactor * (result + resultShift)^2 + pointShift)
This formula can also be used for track events by setting resultShift = -reference
and pointShift = 0
.
Implementation
For any developers I have created a PHP library to calculate points. You might also be interested to inspect the source even if you have to do this in another programming language.