Transfer data from matlab to ParaView (to process with ttk)

Dear all,
Assume if I created a 3D surface of my data using the isosurface function in the matlab. I want to transfer this data to PraView and How can I do that?
Here below is the sample script taken from the matlab.
Thank you!

[x,y,z,v] = flow;
p = patch(isosurface(x,y,z,v,-3));
p.FaceColor = ‘red’;
p.EdgeColor = ‘none’;
daspect([1 1 1])
axis tight
lighting gouraud

untitled.fig (185.3 KB)

I assume you can save your surface in a matlab using a widely used format such as OBJ or PLY. After that, you can import that surface in ParaView. Note that you’ll lose your colors and lighting as that is not part of the “data” in paraview.

@Dan Lipsa.
Thank you. I have tried to save it in .stl format. Since the ParaView can read the .stl (Standard Triangle Language) format, I have tried to transfer a sample 3D data shown below) to ParaView (TTK) software with stlwriter function using the code from Matlab file exchange (stlwrite - write ASCII or Binary STL files - File Exchange - MATLAB Central).

As you said, I lose my colors and lighting as that is not part of the “data” in paraview. However, we can use any color from the paraview software itself (as shown).

data =zeros(64, 64, 64);

data(20:40,20:40, 20:40) =1;




p.FaceColor = ‘blue’;

p.EdgeColor = ‘none’;

axis tight


lighting gouraud

axis([1 64 1 64 1 64])