# 3D curve through points

**URL:** https://discourse.paraview.org/t/3d-curve-through-points/9590
**Category:** ParaView Support
**Created:** [May 9, 2022, 2:34am UTC](https://discourse.paraview.org/t/3d-curve-through-points/9590 "2022-05-09T02:34:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![austinsp](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/e9bcb4/32.png) [@austinsp](https://discourse.paraview.org/u/austinsp)
#### Post date: [May 9, 2022, 2:34am UTC](https://discourse.paraview.org/t/3d-curve-through-points/9590/1 "2022-05-09T02:34:35Z")

</div>

Hi there,

I am trying to use ParaView to visualize a curve in 3D space, defined by a set of (x, y, z) points parameterized by time. I would also like to color different parts of the curve by values defined along it (like the magnitude of a velocity field, or any other scalar field). I am wondering what the most efficient way to do this would be?

My first thought was to define the dataset as a VTK Unstructured 1D Mesh in 3-space, and then assign a scalar field to it as usual. Just figured I’d check and see if there’s an easier way, given that I’m basically using PV as a 3D matplotlib in this use case. There are other things I’d like to do with the data which necessitates my use of PV however.

Thanks!  
Sam

---

<div class="post-metadata">

### Author: ![bflandard](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bflandard](https://discourse.paraview.org/u/bflandard)
#### Post date: [May 9, 2022, 7:20am UTC](https://discourse.paraview.org/t/3d-curve-through-points/9590/2 "2022-05-09T07:20:42Z")

</div>

Not exactly an answer to your question, but you could have a look here:  
[pyVista spline](https://docs.pyvista.org/examples/00-load/create-spline.html?highlight=spline)

---

<div class="post-metadata">

### Author: ![MiguelAngelAGUIRRE](https://discourse.paraview.org/user_avatar/discourse.paraview.org/miguelangelaguirre/32/2986_2.png) [@MiguelAngelAGUIRRE](https://discourse.paraview.org/u/MiguelAngelAGUIRRE)
#### Post date: [May 9, 2022, 1:12pm UTC](https://discourse.paraview.org/t/3d-curve-through-points/9590/3 "2022-05-09T13:12:06Z")

</div>

Hello,

What you are looking for is a Programmable filter. See section 5.2.5 (Helix Source) in this link:

[https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html](https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html)

regards

Miguel

---

<div class="post-metadata">

### Author: ![austinsp](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/e9bcb4/32.png) [@austinsp](https://discourse.paraview.org/u/austinsp)
#### Post date: [May 9, 2022, 7:10pm UTC](https://discourse.paraview.org/t/3d-curve-through-points/9590/4 "2022-05-09T19:10:38Z")

</div>

Awesome, thanks so much everyone! Exactly what I was looking for but didn’t know the right keywords.
