# Arc length of a 3D Curve

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.

• 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. – abel Jan 4 '15 at 19:29
• If you want higher precision, you create a cubic spline from the points and integrate the spline. – ja72 Jan 4 '15 at 19:36
• – Dr. Sonnhard Graubner Jan 4 '15 at 19:41