Creating a Graphical Interface for FORTRAN Programs: Tips and Tools

In summary: PGPLOT can be used to generate graphs, but it is not specifically designed to be used with images. PLPLOT is designed specifically for generating graphics with images.
  • #1
minger
Science Advisor
1,496
2
Hi guys, I am fairly competent at programming scientific FORTRAN programs (from the CFD world). A friend of mine asked me to help him develop a program which he says will help him in his profession greatly. The backend calculations are incredibly easy. However, what I need to do is this:

1) Load or link to an image
2) Display image in window
3) Click points on image
4) Send point coordinates to subroutine
5) Draw lines between points
6) Display results in windows, hell even a simple output file would probably suffice

Anyways, what I have no idea how to do is the graphical stuff. Can anyone direct me to some references on what I might be able to use for this. I don't need to manipulate the image, only basically draw points on top of it.

Thanks,
 
Technology news on Phys.org
  • #2
I don't know anyone that's ever bothered to make Fortran look pretty with a GUI in Fortran. Have you thought about doing mixed language? It's pretty easy to do a GUI and images with Java. I haven't done mixed language with Java (though I've done C++ and Fortran) but I have made a GUI in it and it didn't take too long to learn how to do it.

Via a quick google: http://www.math.ucla.edu/~anderson/JAVAclass/JavaInterface/JavaInterface.html
 
  • #3
It's not necessarily about making a GUI...well I guess it is. The problem is that he needs to be able to pull up a picture, and then draw lines on it. It doesn't have to be pretty, I really just need to be able to insert a picture into a window, then insert points and havelines drawn between them.

I will take a look at Java, but ideally I'd like to not have to learn another new language. Does anyone have any experience with something like PGPLOT, or PLPLOT?
 

1. What is a FORTRAN Graphical Interface?

A FORTRAN Graphical Interface is a user interface that allows a user to interact with a FORTRAN program through visual elements such as buttons, menus, and windows. It makes it easier for users to input data, run the program, and visualize the results.

2. Why is a Graphical Interface important for FORTRAN?

A Graphical Interface is important for FORTRAN because it makes the language more user-friendly and accessible to individuals who are not familiar with coding. It also allows for easier navigation and debugging of the program, making it more efficient and less time-consuming.

3. How is a FORTRAN Graphical Interface created?

A FORTRAN Graphical Interface can be created using various libraries and tools such as FortranGUI, FortranBuilder, and FORGE. These tools provide a visual development environment for creating the interface and integrating it with the FORTRAN code.

4. Can a FORTRAN Graphical Interface be customized?

Yes, a FORTRAN Graphical Interface can be customized to meet the specific needs and preferences of the user. Users can change the layout, color scheme, and functionality of the interface to make it more personalized.

5. Are there any disadvantages to using a FORTRAN Graphical Interface?

One potential disadvantage of using a FORTRAN Graphical Interface is the added complexity and learning curve for users who are not familiar with coding. It may also require additional resources and time to develop the interface. However, these potential downsides are outweighed by the benefits of making the FORTRAN language more accessible and user-friendly.

Similar threads

  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
Replies
9
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Programming and Computer Science
Replies
5
Views
7K
  • Programming and Computer Science
Replies
13
Views
5K
  • Programming and Computer Science
Replies
3
Views
3K
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
4
Views
927
  • Programming and Computer Science
Replies
2
Views
8K
  • Programming and Computer Science
Replies
2
Views
3K
Back
Top