# Connect set of ordered points with lines

**URL:** https://discourse.paraview.org/t/connect-set-of-ordered-points-with-lines/10177
**Category:** ParaView Support
**Created:** [August 22, 2022, 8:45am UTC](https://discourse.paraview.org/t/connect-set-of-ordered-points-with-lines/10177 "2022-08-22T08:45:22Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![s195t](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@s195t](https://discourse.paraview.org/u/s195t)
#### Post date: [August 22, 2022, 8:45am UTC](https://discourse.paraview.org/t/connect-set-of-ordered-points-with-lines/10177/1 "2022-08-22T08:45:22Z")

</div>

Dear everyone,

I would have a set of 3D points in space (divided by unique Id of line and ordered by ascending X), which I would like to connect with a 3D line. Is there a way to use this points to visualise a set of 3D lines?  
Probably a Programmable Source might do the job…

The structure of the points that I have in the source csv is:  
ID, X, Y, Z  
and ideally I wanted to connect the points with the same ID with a line

Is there a way to do so?

Thank you in advance

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [August 22, 2022, 9:08am UTC](https://discourse.paraview.org/t/connect-set-of-ordered-points-with-lines/10177/2 "2022-08-22T09:08:36Z")

</div>

You can read your `CSV` with ParaView natively to load the data and then use a `Programmable Filter` to create the lines. You will write vtk python code to create a `vtkCellArray`, fill some `vtkIdLists` with the points ids for each line (id is the index in list of poitns, different from you ID column) and then create `VTK_POLY_LINE` cells.

[Here](https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html#reading-a-csv-file-with-particles) are some examples of programmable filters.
