F
F
Fortunato282018-06-05 09:48:14
Qt
Fortunato28, 2018-06-05 09:48:14

How to build a two-dimensional graph with three axes using C++, QT?

It is necessary to build a flat two-dimensional graph on which vectors (these are like arrows) with three coordinates will be displayed. Those. as a projection of a three-dimensional graph onto a plane.
Obviously, you can use qtcustomplot, but I did not google the possibility to use the third axis. From what side then to approach the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Antony, 2018-06-05
@RiseOfDeath

It is logical that a two-dimensional graph cannot draw three-dimensional vectors. Take and do the projection yourself and drive it into qtcustomplot.
You need projections of your vector onto the unit vectors oX (1, ​​0, 0) and oY (1, 0, 0); then add the projections on oX and oY - this will be the projection of the vector on the "graphics" plane. (well, unless you have to throw out the coordinates along the Z axis from the vector, it should turn out to be equal to zero anyway)
Google how to build the projection of a vector onto a vector.
ps
Well, of course, the plane from my example above is one of countless. You can use any bases if needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question