# Interpolating points and direction along a path in 3D space

**URL:** https://discourse.vtk.org/t/interpolating-points-and-direction-along-a-path-in-3d-space/115
**Category:** Support
**Created:** [January 24, 2019, 12:26pm UTC](https://discourse.vtk.org/t/interpolating-points-and-direction-along-a-path-in-3d-space/115 "2019-01-24T12:26:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kit](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/k/9fc29f/32.png) [@kit](https://discourse.vtk.org/u/kit)
#### Post date: [January 24, 2019, 12:26pm UTC](https://discourse.vtk.org/t/interpolating-points-and-direction-along-a-path-in-3d-space/115/1 "2019-01-24T12:26:17Z")

</div>

Hi,

This is my first go with discourse, so I hope I am using this correctly. If not feel free to re-file this post.

I have a series of points on a path [(x1,y1,z1)…(xN,yN,zN)] and a function at the points [f1,…,fN] which is point-wise increasing but not necessarily by a fixed amount. I need to evaluate the path position and orientation at arbitrary values of f.

My first guess is that vtkParametricSpline is the way to go, but can this compute the orientation as well as the position? Or is there another tool I should be thinking about?

Thanks

Kit

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [January 24, 2019, 2:49pm UTC](https://discourse.vtk.org/t/interpolating-points-and-direction-along-a-path-in-3d-space/115/2 "2019-01-24T14:49:10Z")

</div>

Frenet-Serret frame gives you both interpolated position and orientation along a curve - see implementation here: [https://www.vtkjournal.org/browse/publication/838](https://www.vtkjournal.org/browse/publication/838)

---

<div class="post-metadata">

### Author: ![kit](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/k/9fc29f/32.png) [@kit](https://discourse.vtk.org/u/kit)
#### Post date: [January 24, 2019, 2:56pm UTC](https://discourse.vtk.org/t/interpolating-points-and-direction-along-a-path-in-3d-space/115/3 "2019-01-24T14:56:34Z")

</div>

Thanks, will take a look.

---

<div class="post-metadata">

### Author: ![lorensen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lorensen/32/20_2.png) [@lorensen](https://discourse.vtk.org/u/lorensen)
#### Post date: [February 16, 2019, 4:23am UTC](https://discourse.vtk.org/t/interpolating-points-and-direction-along-a-path-in-3d-space/115/4 "2019-02-16T04:23:26Z")

</div>

The FrenetSerretFrame is implemented as a Remote Module in VTK. To gain access to the class,

1. For VTK 8.3 and lower,  
Module\_SplineDrivenImageSlicer:BOOL=ON

2. For VTK HEAD,  
VTK\_MODULE\_ENABLE\_VTK\_SplineDrivenImageSlicer:STRING=WANT

There are two examples in the [VTKExamples Project](https://lorensen.github.io/VTKExamples/site/):

[FrenetSerretFrame](https://lorensen.github.io/VTKExamples/site/Cxx/Remote/FrenetSerretFrame/)

and

[FrenetSerretFrameDemo](https://lorensen.github.io/VTKExamples/site/Cxx/Remote/FrenetSerretFrameDemo/)

Enjoy,

Bill
