PDA

View Full Version : coordinate system



Wojtek.wk
12th April 2010, 09:45
Hi! I'm looking for any information about how I can write the coordinate system in QT. I'm doing some project with GSL (Gnu Scientific Library) and I want to write some points in the coordinate system, but I don't know how to do it...
Thanks in advance for any help.

wysota
12th April 2010, 10:05
Would you care to elaborate what exactly you want and what exactly you don't know how to do? Some example, maybe?

Wojtek.wk
12th April 2010, 12:42
Thank you for reply. Yes, of course. I have to compare various methods of root finding in 2D (from GSL). And what I want to do is to show how the solution is better and better during the successive iteration. Firstly, I want to draw a point, which is the solution of the system of equations. Then, after each iteration I want to draw a point just computed. After the next iterations, the next points should be drawn nearer and nearer to the solution (point drawn in the first step). I want to draw all this things in the coordinate system (cartesian) (with x- and y-axis). The result should be something similar to gnuplot but made in QT...

wysota
12th April 2010, 13:01
Still I fail to see what the problem is :) Maybe you could explain what you mean by "write a coordinate system"?

Lesiok
12th April 2010, 13:18
Maybe look at Qwt (http://qwt.sourceforge.net/)

Wojtek.wk
12th April 2010, 13:31
I fail to see what the problem is Maybe you could explain what you mean by "write a coordinate system"?
I want to have drawn something like this: http://upload.wikimedia.org/wikipedia/commons/0/0e/Cartesian-coordinate-system.svg

@Lesiok: Thank you, very interesting :)

wysota
12th April 2010, 13:41
I think we understand different things by the term "coordinate system" :) You mean you want to draw a graph/chart, right? :)

Is the problem mathematical or you don't know how to draw primitives or what exactly?

The image you link to is invalid, by the way... each axis should only have one arrow head :]

TheJim01
12th April 2010, 13:47
You could make your own custom widget for this. If so, you're going to want to read about QImage (http://doc.trolltech.com/4.6/qimage.html) and QPainter (http://doc.trolltech.com/4.6/qpainter.html).