Question

I'm developing an algorithm in which the data points "navigate" in a 2D space

For developing and debugging purposes, I need to visualize such data in a way that I can identify the data points iterating in the image: whether they are behaving correctly at the borders of the 2D space or when interacting with one another. Previously, I used ncurses for this, but it has some limitations. Later on, I'll need to colorize some points according to some rules.

So, I was thinking of building an image where every point would correspond to a pixel coordinate. The images should be built in background for later inspection. For the first debugging phase, with only 20 points, the images would be very small but I could zoom in them to see the points. Later on, with more point, I could watch the collective behavior of them.

How can I achieve this in a simple manner? Is there a way to it directly from my code a few lines of simple code or do I really have to use some graph library?

Was it helpful?

Solution

If this is a R&D effort, I would suggest looking at the Processing language, which makes experimental graphics easy. http://processing.org/

Here is an example that plots coordinates as dots. I think this is what you would start with:

http://processing.org/examples/pointillism.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top