1
$\begingroup$

I have a set of points in 3D space:

$$\left(x_i, y_i, z_i\right)$$

These points create a 3D curve and I am trying to calculate its arc length. I have followed what is described here but when I compare my results to a visualization tool they are different. This is how I calculated the arc length:

$$L = \sum_{i=0}^{N-1}\sqrt{\left(x_{i+1}-x_i\right)^2+\left(y_{i+1}-y_i\right)^2+\left(z_{i+1}-z_i\right)^2}$$

where $N$ is the number of points.

Could someone kindly tell me their thoughts on this? I would appreciate it.

$\endgroup$
  • 2
    $\begingroup$ the formula for the arc length is correct. you need to take $N$ large enough to resolve kinks in the arc, if you have any. $\endgroup$ – abel Jan 4 '15 at 19:29
  • 1
    $\begingroup$ If you want higher precision, you create a cubic spline from the points and integrate the spline. $\endgroup$ – ja72 Jan 4 '15 at 19:36
  • 1
    $\begingroup$ see here mathwiki.ucdavis.edu/Calculus/Vector_Calculus/… $\endgroup$ – Dr. Sonnhard Graubner Jan 4 '15 at 19:41
1
$\begingroup$

The formula you used is to compute the sum of chord length of these N points. So, unless the 3D curve you created is just a polyline connecting all the input points, the arc length value you get from that formula is only a very rough estimate of the actual arc length. You can sample more points ( > N ) on the 3D curve and use the same formula to get a more precise arc length value. The more points you sample, the more precise the value will be. Ideally, you should use some numeric integration method to find the real arc length.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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