Creating a Graphical Interface for FORTRAN Programs: Tips and Tools

  • Context: Fortran 
  • Thread starter Thread starter minger
  • Start date Start date
  • Tags Tags
    Fortran Interface
Click For Summary
SUMMARY

This discussion focuses on creating a graphical interface for FORTRAN programs, specifically for scientific applications in computational fluid dynamics (CFD). The user seeks guidance on displaying images, capturing click coordinates, and drawing lines between points using FORTRAN. Suggestions include exploring mixed-language approaches with Java for GUI development, as well as investigating libraries like PGPLOT and PLPLOT for graphical capabilities within FORTRAN.

PREREQUISITES
  • Familiarity with FORTRAN programming, particularly in scientific applications.
  • Basic understanding of graphical user interface (GUI) concepts.
  • Knowledge of image handling and coordinate systems.
  • Experience with mixed-language programming, particularly with Java or C++.
NEXT STEPS
  • Research PGPLOT library for FORTRAN to handle basic plotting tasks.
  • Explore PLPLOT for enhanced graphical capabilities in FORTRAN applications.
  • Learn Java GUI development to create a mixed-language interface with FORTRAN.
  • Investigate existing resources and tutorials on integrating images in FORTRAN applications.
USEFUL FOR

This discussion is beneficial for FORTRAN developers, particularly those working in scientific computing, who are looking to implement graphical interfaces and enhance user interaction in their applications.

minger
Science Advisor
Messages
1,494
Reaction score
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
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
 
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?
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 5 ·
Replies
5
Views
8K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 2 ·
Replies
2
Views
9K