# Ellipsoid particle motion

**URL:** https://discourse.paraview.org/t/ellipsoid-particle-motion/9081
**Category:** ParaView Support
**Created:** [February 27, 2022, 5:23pm UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081 "2022-02-27T17:23:38Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![kaazem\_Rezaa\_Asl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kaazem_rezaa_asl/32/8692_2.png) [@kaazem\_Rezaa\_Asl](https://discourse.paraview.org/u/kaazem_Rezaa_Asl)
#### Post date: [February 27, 2022, 5:23pm UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/1 "2022-02-27T17:23:38Z")

</div>

Dear All,  
I am currently working on ellipsoid particle tracking using openFoam. I would like to visualize the ellipsoid particles motion in paraview using xyz coordinates, minor & major axis, and orientation. I have all these parameters in text files for each single particle. Is it possible to read them and visualize particle motion?  
Best Regards,  
Kazem

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 27, 2022, 10:14pm UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/2 "2022-02-27T22:14:18Z")

</div>

Did you try loading your files in ParaView ?

---

<div class="post-metadata">

### Author: ![kaazem\_Rezaa\_Asl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kaazem_rezaa_asl/32/8692_2.png) [@kaazem\_Rezaa\_Asl](https://discourse.paraview.org/u/kaazem_Rezaa_Asl)
#### Post date: [February 28, 2022, 6:46am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/3 "2022-02-28T06:46:16Z")

</div>

No. because i do not know if paraview has this capability to visualize an ellipsoid particle through a text file. I have not been working with paraview very much and not sure if it is a simple task.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 28, 2022, 7:02am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/4 "2022-02-28T07:02:46Z")

</div>

please share your data

---

<div class="post-metadata">

### Author: ![kaazem\_Rezaa\_Asl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kaazem_rezaa_asl/32/8692_2.png) [@kaazem\_Rezaa\_Asl](https://discourse.paraview.org/u/kaazem_Rezaa_Asl)
#### Post date: [February 28, 2022, 8:17pm UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/5 "2022-02-28T20:17:01Z")

</div>

Thanks for your consideration. I attached a sample file. It contains the properties as follows:  
time x y z minor diameter major diameter transformation matrix (it is a matrix expressed in terms of either Euler angles or Euler parameters (quaternions))  
[Sample.csv](https://discourse.paraview.org/uploads/short-url/c7LzEBs9HHWPtI5ItvfU2WOmVPB.csv) (14.2 KB)

---

<div class="post-metadata">

### Author: ![kaazem\_Rezaa\_Asl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kaazem_rezaa_asl/32/8692_2.png) [@kaazem\_Rezaa\_Asl](https://discourse.paraview.org/u/kaazem_Rezaa_Asl)
#### Post date: [March 3, 2022, 7:06am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/6 "2022-03-03T07:06:35Z")

</div>

Any idea how to draw an ellipse using a text file??

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 3, 2022, 8:11am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/7 "2022-03-03T08:11:02Z")

</div>

Your files is not of .csv format, it cant be opened easilly in ParaView.

---

<div class="post-metadata">

### Author: ![kaazem\_Rezaa\_Asl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kaazem_rezaa_asl/32/8692_2.png) [@kaazem\_Rezaa\_Asl](https://discourse.paraview.org/u/kaazem_Rezaa_Asl)
#### Post date: [March 3, 2022, 8:13am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/8 "2022-03-03T08:13:29Z")

</div>

i can send txt file. would it solve the problem??

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 3, 2022, 8:14am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/9 "2022-03-03T08:14:39Z")

</div>

You need to generate compatible data. Cant help you much more here.

---

<div class="post-metadata">

### Author: ![kaazem\_Rezaa\_Asl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kaazem_rezaa_asl/32/8692_2.png) [@kaazem\_Rezaa\_Asl](https://discourse.paraview.org/u/kaazem_Rezaa_Asl)
#### Post date: [March 3, 2022, 8:17am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/10 "2022-03-03T08:17:46Z")

</div>

what do you mean by compatible data? i really wanna know how Paraview deal with the data? because for a spherical particle there is a table to point filter. But how about other shapes such as ellipse??

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 3, 2022, 8:29am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/11 "2022-03-03T08:29:22Z")

</div>

ParaView will just show what you give to it if the data is compatible. Your data is not.

You may want to read the ParaView tutorial:  
[https://www.paraview.org/Wiki/images/1/17/ParaViewTutorial510.pdf](https://www.paraview.org/Wiki/images/1/17/ParaViewTutorial510.pdf)

---

<div class="post-metadata">

### Author: ![kaazem\_Rezaa\_Asl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kaazem_rezaa_asl/32/8692_2.png) [@kaazem\_Rezaa\_Asl](https://discourse.paraview.org/u/kaazem_Rezaa_Asl)
#### Post date: [March 3, 2022, 8:37am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/12 "2022-03-03T08:37:58Z")

</div>

Thanks. So you do not have any suggestion but compatibility. I was wondering if Paraview has this capacity itself or i need to develop a customized filter to visualize an ellipse.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 3, 2022, 8:42am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/13 "2022-03-03T08:42:05Z")

</div>

> [@kaazem\_Rezaa\_Asl](#):
>
> I was wondering if Paraview has this capacity itself or i need to develop a customized filter to visualize an ellipse.

ParaView can show an ellipse of course, but you need to provide the data that contains the ellipse.

---

<div class="post-metadata">

### Author: ![kaazem\_Rezaa\_Asl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kaazem_rezaa_asl/32/8692_2.png) [@kaazem\_Rezaa\_Asl](https://discourse.paraview.org/u/kaazem_Rezaa_Asl)
#### Post date: [March 3, 2022, 8:50am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/14 "2022-03-03T08:50:45Z")

</div>

Good news. So i need to just build a compatible data file. Right? not developing any filter or stuff like that. Is there any guide how to build a file that contains the ellipse? I suppose to draw an ellipse we need the origin and three points. Right?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 3, 2022, 8:52am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/15 "2022-03-03T08:52:07Z")

</div>

So you just want to generate an ellipse in ParaView ? Thats even more easy.

Source → Ellipse → Apply

---

<div class="post-metadata">

### Author: ![kaazem\_Rezaa\_Asl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kaazem_rezaa_asl/32/8692_2.png) [@kaazem\_Rezaa\_Asl](https://discourse.paraview.org/u/kaazem_Rezaa_Asl)
#### Post date: [March 3, 2022, 8:54am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/16 "2022-03-03T08:54:05Z")

</div>

It is a good suggestion but not for my case. I export ellipse coordinates from openfoam and need to read in Paraview. I can not visualize 2000 ellipse let say by hand.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 3, 2022, 8:55am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/17 "2022-03-03T08:55:01Z")

</div>

> [@kaazem\_Rezaa\_Asl](#):
>
> I export ellipse coordinates from openfoam and need to read in Paraview.

Ok, well then just write .csv or .vtk file from OpenFOAM. It should contains the actual points of the ellipse.

---

<div class="post-metadata">

### Author: ![kaazem\_Rezaa\_Asl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kaazem_rezaa_asl/32/8692_2.png) [@kaazem\_Rezaa\_Asl](https://discourse.paraview.org/u/kaazem_Rezaa_Asl)
#### Post date: [March 3, 2022, 8:58am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/18 "2022-03-03T08:58:29Z")

</div>

Thanks. I will try your suggestion. Just need to find out how many points of ellipse shall i provide for Paraview

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 3, 2022, 9:07am UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/19 "2022-03-03T09:07:23Z")

</div>

> [@kaazem\_Rezaa\_Asl](#):
>
> Just need to find out how many points of ellipse shall i provide for Paraview

As much as you need to make your visualization as smooth as you need.

---

<div class="post-metadata">

### Author: ![Christos\_Tsolakis](https://discourse.paraview.org/user_avatar/discourse.paraview.org/christos_tsolakis/32/4450_2.png) [@Christos\_Tsolakis](https://discourse.paraview.org/u/Christos_Tsolakis)
#### Post date: [March 4, 2022, 8:50pm UTC](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081/20 "2022-03-04T20:50:34Z")

</div>

> [@kaazem\_Rezaa\_Asl](#):
>
> Dear All,  
> I am currently working on ellipsoid particle tracking using openFoam. I would like to visualize the ellipsoid particles motion in paraview using xyz coordinates, minor & major axis, and orientation. I have all these parameters in text files for each single particle. Is it possible to read them and visualize particle motion?  
> Best Regards,  
> Kazem

Hi Kazem,

an alternative route is to create a file containing the points and store the ellipsoid matrix of corresponding to each point as a tensor. ParaView will then be able to create an ellipsoid centered on each of your points. The tensor values will define orientation and the axes of the ellipsoid. This should solve the issue of visualizing many of them.

For example :

 ![Screenshot from 2022-03-04 15-42-18](https://discourse.paraview.org/uploads/default/original/2X/9/9d5edc8e0784e57029c0bce8b75f8f1dc0b699b2.jpeg)

Attached is the corresponding file  
[ellipses.vtk](https://discourse.paraview.org/uploads/short-url/s9OVMaZ1HYVR5i6uscVjO7pFoxH.vtk) (174 Bytes)

The expected format of the matrices is described [here](https://vtk.org/doc/nightly/html/classvtkTensorGlyph.html#details)

[Next page](https://discourse.paraview.org/t/ellipsoid-particle-motion/9081.md?page=2)
