PDA

View Full Version : big vector graphics



Colx007
21st January 2008, 18:19
How do indicate to QGraphicsView that print a function z(x, y) or any matrix,
where Matrix = Data[however][3] and Z is positive in depth ?

By example:

X Y Z
1 1 1
1 2 1
2 1 0



I know to use the data, I don’t know anything about QGraphicsItem and I read tutorial.
Please, put a single example.

PD: By the way “however” is > 140,000.

wysota
21st January 2008, 18:46
Could you try to rephrase the question? It's not easy to understand what the question is.

Colx007
21st January 2008, 19:08
I want to plot a surface with data give in a matrix X, Y, Z. Specifically North, East and any parameter. I want to use QGraphicView or other tool. but the tutorials and manuals only talk about 2d & not 3D.

Thank you

More detailed:

I have a matrix with many data (x, y, z)

Using MatLab I can generate a surfer the next way


Plot3d(x,y,z);
titlex(“East”);
titley(“North”);
titlez(“Parameter”);
hold

and plot other surface in the same plot.

Surely in Qt must to have any way to surf, something like this


For(i=0;i<however;i++)
QGraphicView::setSomethingLike(matrix[i][]);

Or


For(i=0;i<however;i++)
{
QGraphicView::setX(matrix[i][0]);
QGraphicView::setY(matrix[i][1]);
QGraphicView::setZ(matrix[i][2]);
QGraphicView::PrintSurfer(X,Y,Z);
}

Is only a idea, but how I said, I didn’t find nothing about.

regards

wysota
21st January 2008, 22:25
Look here: http://qwtplot3d.sourceforge.net/

Colx007
22nd January 2008, 13:14
Thank you,
but what is QtOpenGL Module? is it not enoug? Have you used qwtplot3d before? or why using Qt is possible make complex animation but nobody can make a single plot?:confused:

I repet Thank you very much, but a have many quetions

wysota
22nd January 2008, 13:36
but what is QtOpenGL Module?
It is one of Qt's libraries that provides hardware accelerated support for 2D and 3D drawing using OpenGL.

is it not enoug?
It is, but it is lowlevel.


or why using Qt is possible make complex animation but nobody can make a single plot?

You can make plots but you have to implement all the drawing and logic yourself (for example converting 3D coordinates into 2D or calculating and drawing polygons that make the surface). 3rd party libraries like Qwt3D help you focus on your goals and not on the details by providing an additional layer over Qt extending it with new architectures and features.