2
$\begingroup$

I have a discrete 2D temperature field, i. e. a dataset of N points (x, y, T). I would like to compute line integrals at fixed radii, $\int_0^{2\pi}T(r,\theta)d\theta$. My first thought was to transform all coordinates into radial coordinates, and then interpolate to a regular grid in $r,\theta$, so the integral would turn into a simple summation. This approach doesn't seem to be ideal, as I lose data at $r=0$. Is there a better way to solve my problem?

$\endgroup$
6
  • 6
    $\begingroup$ Have you considered interpolating in x,y coordinates and then evaluating the integral? $\endgroup$ Commented Jan 6, 2016 at 15:11
  • 3
    $\begingroup$ Are your $(x,y)$ data points on a uniform grid, or is it an unstructured point cloud? $\endgroup$ Commented Jan 6, 2016 at 20:13
  • $\begingroup$ @WolfgangBangerth The points are on a uniform grid, but stored as a point cloud $\endgroup$
    – akid
    Commented Jan 7, 2016 at 21:45
  • $\begingroup$ @BrianBorchers No... I'll have a look at that. $\endgroup$
    – akid
    Commented Jan 7, 2016 at 21:46
  • $\begingroup$ If the points are on a grid, then interpolating along the points of the circle should be easy. $\endgroup$ Commented Jan 9, 2016 at 2:55

1 Answer 1

1
$\begingroup$

An alternative approach that will help with the situation at $r=0$ is to do the interpolation in $(x,y)$ coordinates first, and then evaluate the integral.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.