$y$, we can compute for each sampling point the values of $s$ for which this sampling point is inside a given object. Often, this is just an interval, or at worst the union of a few intervals. By merging these intervals for each sampling point, we can compute the set of $s$ values for which the loop hits the given object. Now, as $\Theta$ counts the number of objects hit by the loop, it is piecewise constant on the partitioning so obtained; if $\Theta=n$ for $T\in[a,b]$, we have $\int_a^b \frac{ds}{s^5}\, \Theta(sy,x) = n(a^{-4}-b^{-4})/4$.

Note that this means that we also do not need to specify the region of $s$ which we want to sample, i.e. our method does not need to know a geometric length-scale.

Forces on Multiple Bodies via Sensitivity Backpropagation {#sec:autodiff}
---------------------------------------------------------

In order to calculate forces, we have to determine by how much Casimir energies change when changing the geometry. Taking the limit $\Lambda\to\infty$, the subtraction scheme eq.\[eq:subtraction\] is only compatible with geometry changes that change the position and orientation, but not shape, of individual bodies: evidently, the Casimir energy attributed to a single body via this scheme is zero, regardless of its shape. As we naturally 