Is it possible to display a 3D surface graph from a 3D scatter graph in Qt C++?
-
wrote on 18 Jun 2021, 15:08 last edited by
I have a set of (x,y,z) points which I have used QVector3D to append the Q3DScatter Series to be displayed in a Q3DScatter graph. However, is there any possible way for me to display the same set of (x,y,z) points into a Q3DSurface graph? Really appreciate if anyone can help to enlighten me!
-
I have a set of (x,y,z) points which I have used QVector3D to append the Q3DScatter Series to be displayed in a Q3DScatter graph. However, is there any possible way for me to display the same set of (x,y,z) points into a Q3DSurface graph? Really appreciate if anyone can help to enlighten me!
wrote on 18 Jun 2021, 16:43 last edited byHi and welcome to devnet forum
Did you checkout already this example? https://doc.qt.io/qt-5/qtdatavisualization-surface-example.html
-
wrote on 18 Jun 2021, 21:40 last edited by
In general when you have scattered data, that you want to plot as surface, what you need is some kind of triangulation in between the points.
The most common method typically used is delaunay-triangulation.
However I'm not familiar with Qt3D so I don't know how you would do that there. -
Hi and welcome to devnet forum
Did you checkout already this example? https://doc.qt.io/qt-5/qtdatavisualization-surface-example.html
wrote on 19 Jun 2021, 02:41 last edited by@koahnig Hello, thanks for your reply. I have already checked on the example done by Qt. However, I am unsure about the rationale behind how they add data into the surface graph. For example, what is a row data in a surface graph?
-
In general when you have scattered data, that you want to plot as surface, what you need is some kind of triangulation in between the points.
The most common method typically used is delaunay-triangulation.
However I'm not familiar with Qt3D so I don't know how you would do that there. -
@koahnig Hello, thanks for your reply. I have already checked on the example done by Qt. However, I am unsure about the rationale behind how they add data into the surface graph. For example, what is a row data in a surface graph?
wrote on 19 Jun 2021, 17:13 last edited by@Elthon said in Is it possible to display a 3D surface graph from a 3D scatter graph in Qt C++?:
@koahnig Hello, thanks for your reply. I have already checked on the example done by Qt. However, I am unsure about the rationale behind how they add data into the surface graph. For example, what is a row data in a surface graph?
From the example you would need to have your data values on grid. In case you have no grid and only randomly distributed data points, you would need to get some interpolation onto a grid. That is the way Ihave done long before Qt.
Unfortunately I have no experience with Qt3D in this respect.
6/6