PDA

View Full Version : how to map scene coordinates to mathematical cartesian graph coordinates



wagmare
9th April 2013, 13:23
hi friends,

how can i map a scene coordinate of rect (-1000,-1000, 2000, 2000) to a cartesian map coordinates.

im having range and bearing value from which i converted in to cartesian points and now i want to show the points in the QGraphicsview as like mathematical graph

i can position it using polygonItem but how to convert sceneRect to mathematical graph

where
in graph topLeft (-x, +y) topRight( +x, +Y) bottomLeft( -x, -y) bottomRight ( +x, -y)
but our scene coordinates are topLeft(-x, -y) topRight(+x, -y) bottomLeft(+x, -Y) bottomRight(+x, +y) .

please help me how i can plot the item on the scene.

Thnx in advance

Santosh Reddy
10th April 2013, 09:08
This is what I understand, you have a data set of points/graph, and want to plot/draw them on QGrpahicsView. If this is what you want, then just invert the y-coordinate value (change y to -y) and every thing will work relatively.