- #1
MichalXC
- 41
- 0
Hi,
I have a bunch of text documents, each of which contains (among other information) the x- and y-positions of 1,000 different 2-D disks at some given time. I want to write a code in C which takes each text document and outputs a visualization of the system at that instant in time.
The data in the text documents is arranged like this:
[time] [particle diameter] [x-position] [y-position] [x-velocity] [y-velocity] [etc...]
If I could only extract and visualize the position and diameter information, I would have a "snapshot" of the system at a given instant. (I will eventually string together the snapshots to see the motion of the system.)
What would be the best way of going about this from a programming perspective? I've written .ppm files using C code before to visualize the Mandelbrot set... Would that be good? How can I extract and draw the relevant information (position and diameter)? Sample code is appreciated.
Thanks.
I have a bunch of text documents, each of which contains (among other information) the x- and y-positions of 1,000 different 2-D disks at some given time. I want to write a code in C which takes each text document and outputs a visualization of the system at that instant in time.
The data in the text documents is arranged like this:
[time] [particle diameter] [x-position] [y-position] [x-velocity] [y-velocity] [etc...]
If I could only extract and visualize the position and diameter information, I would have a "snapshot" of the system at a given instant. (I will eventually string together the snapshots to see the motion of the system.)
What would be the best way of going about this from a programming perspective? I've written .ppm files using C code before to visualize the Mandelbrot set... Would that be good? How can I extract and draw the relevant information (position and diameter)? Sample code is appreciated.
Thanks.