finding the area of a closed 2d uniform cubic B-spline <p>I have a list of 2d points which are the control vertices (Dx) for a closed uniform cubic B-spline. I am assuming a simple curve (non-self-intersecting, all control points are distinct).</p> <p>I am trying to find the area enclosed by the curve:</p> <p><img src="https://i.stack.imgur.com/3Vlf1.png" alt="enter image description here"></p> <p>If I calculate the knot points (Px), I can treat the curve as a polygon; then I "just" need to find the remaining delta areas, for each segment, between the actual curve and the straight line joining the knot points.</p> <p>I understand that the shape (and therefore area) of a Bspline is invariant under rotation and translation - so for each segment, I can find a translation to put the t=0 knot at the origin and a rotation to put the t=1 knot on the +x axis:</p> <p><img src="https://i.stack.imgur.com/oGwCS.png" alt="enter image description here"></p> <p>I can find the equation for the curve by plugging the points in and re-grouping:</p> <pre><code>P(t) = ( (t**3)*(-Dm1 + 3*D0 - 3*D1 + D2) + (t**2)*(3*Dm1 - 6*D0 + 3*D1) + t*(-3*Dm1 + 3*D1) + (Dm1 + 4*D0 + D1) ) / 6. </code></pre> <p>but I'm tearing my hair out trying to integrate it - I can do</p> <pre><code> 1 / | Py(t) dt / t=0 </code></pre> <p>but that doesn't give me area. I <em>think</em> what I need is</p> <pre><code> Px(t=1) / | Py(t) (dPx(t) / dt) dt / x = Px(t=0) </code></pre> <p>but before I go further, I'd really like to know:</p> <ol> <li><p>Is this the correct calculation for area? Ideally, an analytic solution would make my day!</p></li> <li><p>Once I find this area, how can I tell whether I need to add or subtract it from the base poly (red vs green areas in the first diagram)?</p></li> <li><p>Are there any Python modules which would do this calculation for me? Numpy has some methods for evaluating cubic Bsplines, but none which seem to deal with area.</p></li> <li><p>Is there an easier way to do this? I am thinking about maybe evaluating P(t) at a bunch of points - something like <code>t = numpy.arange(0.0, 1.0, 0.05)</code> - and treating the whole thing as a polygon. Any idea how many subdivisions are needed to guarantee a given level of accuracy (I'd like error &lt; 1%)?</p></li> </ol>