Stress distribution(graphic) by using programming

AI Thread Summary
C programming lacks built-in graphics capabilities, making it unsuitable for visualizing stress distribution without complex add-on libraries like OpenGL, which may be too advanced for a quick assignment. Alternative software options such as Matlab, IDL, or Mathematica are recommended for their robust graphing features and ease of use, with many universities providing access to these tools. For those seeking free solutions, open-source programs like gnuplot, hippodraw, and grace can be explored, though their effectiveness for 2-D intensity plots may vary. Additionally, dedicated post-processing software like GiD can handle finite element simulation results and create the required visualizations with minimal coding.
jaymin
Messages
10
Reaction score
0
hello, i hav another assignment need to do with programming..
previously i only learn C..
but my lecturer need us to show the stress distribution on a plane when force acted onto it..
some thing like blue colour is for high intensity of stress(in range) then the further it go, the colour change with the intensity of stress...
actually it's the calculation of finite element by using programming..
can C do that?
or other programming is better for it? (like visual basic)
it's urgent also..
please help me..
thanks
 
Last edited:
Technology news on Phys.org
jaymin said:
hello, i hav another assignment need to do with programming..
previously i only learn C..
but my lecturer need us to show the stress distribution on a plane when force acted onto it..
some thing like blue colour is for high intensity of stress(in range) then the further it go, the colour change with the intensity of stress...
actually it's the calculation of finite element by using programming..
can C do that?
or other programming is better for it? (like visual basic)
it's urgent also..
please help me..
thanks

By itself, C does not have any graphics capability. You would need to use add-on libraries. The only ones I know of, like OpenGL, are too complex for a quick homework assignment--they're made for industrial strength rendering. Maybe some other people can name better alternatives.

Fastest route is to use a program like Matlab, IDL, or Mathematica, that has graphing capabilties. Often times, university computing centers will make one or more of these programs available to students. If you can cough up ~$100 (that's what it was in my day), Mathematica and (I think) Matlab have student versions.

Lower on the scrounge chain, you used to be able to download IDL and use it for seven minutes in demo mode for $0. It's a hard way to learn.

Open source programs include gnuplot, hippodraw, and grace. Don't know how well they'd do at a 2-D intensity plot.

Good luck,
Tim
 
In addition to what nmtim mentioned, if it's a FEM simulation result you could use some of the dedicated post-processing software freely available like GiD or so (internet finite element resources has a longish list). Those are more than able to produce the type of illustration you're after (with perhaps some minor scripting/coding to format the input), although imho the fastest way would be to use Matlab or a related freeware package.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Back
Top