Graphics for c++

Hi all,

I have this truss-solver implementation in c++ which, for a given truss and boundary conditions, it calculates the displacements at the joints, and the stress at the elements. So at the end of the run, the console will display something like this:


1
2
3
4
5
6
7
8
9
 -Node-    -Disp.-
    1        0.50
    2        0.04
    3        1.21

-Element-  -Stress-
    1       121.50
    2        99.14
    3       144.09


I would like to plot that results to see the deformed structure on the screen, for example: http://www.aem.umn.edu/people/faculty/shield/software/truss/main12.gif
or
http://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Deformframe.JPG/750px-Deformframe.JPG

My knowledge of how to implement that kind of graphics is zero. So a solution that is easy to implement, or fast/easy to learn will be appreciated. By the way, I'm using CodeBlocks for Windows, and i would like the final application to be cross platform.

If there's something i'm not taking into account or you have other suggestions, i would like to know them.

Thanks.
Last edited on
A few widget toolkits have explicit tools meant for graphing. http://www.qcustomplot.com/
I almost feel bad recommending Tk again... but here is a similar thread from before:
http://www.cplusplus.com/forum/general/126902/

You would have to have a list of points (joints) and edges (trusses) to draw, and be able to calculate their offsets based upon the stresses. You'll need a solver for the system to get everything to settle to the correct places.

Sorry I can't be more helpful.
Topic archived. No new replies allowed.