Close

Lag free GPU based Data Plotting

A project log for Box0

Free and open source tool for exploring science and electronics anytime anywhere

kuldeep-singh-dhakaKuldeep Singh Dhaka 05/01/2016 at 11:530 Comments

Plotting on Android using OpenGLES

Everybody and their cat, is showing their graph.
But, do you know how much CPU does it take for interaction and plotting?
NO! static images do not convey the information of interaction and plotting lag.

Initally, we started with PyQtGraph (Python)
It does all the stuff for quick and easy plotting with good results.

Then,
After being more productive with C than Python + good result comming with it.
We switched to C for developement (and C++ due to Qt).
Started writing software in Qt5 (with QCustomPlot).
QCustomplot was ok but had performance problem and memory wastage problem.
Then, We switched to Qwt and used for a long time.

Also,
Since Qwt had OpenGL support, we gave it a try.
result: no practical gain.
Qwt was the best library that work was working (though with some lags).

Alternatively,
I tried Vispy (though Python test program) in between but it had problem.
Sometime back tried PyQtGraph (again), i just discovered that PyQtGraph (on Qt5) is slow than (on Qt4).

Finally,
I was a corner cat.
I had to write a plotting library.
Requirement:

Initally, A plotting code was designed for Android using GPU.
(using the code, achieved: less cpu usage [power saving], effecient and lag free)
The Android code was ported to desktop (but didnt work properly).
Then, I wrote libreplot (reusing code from the android code)

libreplot would have never been possible without OpenGL Scientific Arch on Wikibooks.
Some of the code is adapted from the Wikibook OpenGL Programming project.

We use it for everything.
This includes

We pushed plotting on Desktop and Android to another limit.


Note: as of 18 April 2016, libreplot only support 2D cartesian plot.
Note: libreplot can be used on any platform that support OpenGL(ES).

Discussions