JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
|
This project (see paramvectorfield
demonstrates the use of JKQTPParametrizedVectorFieldGraph to visualize a vector field with additional information encoded in the color of the vectors.
The source code of the main application is (see paramvectorfield.cpp
.
Here is a short summary of the important parts of the code:
The result looks like this:
By default, the color of the drawn vector is determined from the color column provided to the graph object. But you can also choose to not provide a color column and instead set
Now the color encodes the actual length (or magnitude) of the vectors:
Alternatively
will color-encode the rotation angle (in radians, 3 o'clock is 0rad) of the vectors: