Plotting Points Dynamically (While Program is Running)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 18937986238
    New Member
    • Jun 2018
    • 1

    Plotting Points Dynamically (While Program is Running)

    Hello. I would like to know a way to plot points in C++ when for(...) is running. So I don't want it to be a static image as an output (for example, if I programmed it to draw y=2*x and x ranges from 0.00 to 10.00, I don't want a graph just to appear instantly, I want every point to be plotted separately, so every iteration of for(...) should make a new point appear: x=0.00 first, then x=0.01, then x=0.02 etc. and the program should be running either until the graph is plotted, or until I stop it).
    P.S. It won't be an actual graph, just points being plotted, no lines, no other shapes, jsut points on a plane. If you need more details, ask me again :)
  • YangLi
    New Member
    • Aug 2018
    • 2

    #2
    Just my suggestion:
    This request need 2 threads, one thread get dynamic real-time data, another thread plot points on screen, and they have a shared critical section which is the data buffer. It means, one thread put data in the buffer, another thread fetch data from the buffer.

    Comment

    Working...