By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,548 Members | 1,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,548 IT Pros & Developers. It's quick & easy.

Plotting Points Dynamically (While Program is Running)

P: 1
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 :)
Jun 16 '18 #1
Share this Question
Share on Google+
1 Reply

P: 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.
Aug 21 '18 #2

Post your reply

Sign in to post your reply or Sign up for a free account.