Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

2-D / 3-D graphics libraries for Fortran 90+?

584 views
Skip to first unread message

Ben

unread,
Apr 11, 2009, 4:05:51 PM4/11/09
to
Hi,

I'm looking for advice and, preferably, examples of how I can use
Fortran to call some sort of graphics library such as SDL and/or
Allegro -- these are the only two I've found so far that might be
relatively easy to work with. I'm open to other ideas. I'm working
primarily on linux.

If you're aware of tutorials for either these specific to Fortran,
please let me know. Searching doesn't appear to reveal much, other
than "do it yourself by calling the C++ functions...". Even a
simple example would get me over the "hump", considering I don't have
much experience calling C++ functions/subroutines from Fortran.

Kind regards,

-Ben
p.s., in an unrelated question: is there a "free" non-commercial
version of Intel Fortran Compiler for Windows as well? Seems I've
only seen the Linux version available...

viper-2

unread,
Apr 11, 2009, 7:32:32 PM4/11/09
to
On Apr 11, 4:05 pm, Ben <jben...@gmail.com> wrote:
> Hi,
>
> I'm looking for advice and, preferably, examples of how I can use
> Fortran to call some sort of graphics library such as SDL and/or
> Allegro -- these are the only two I've found so far that might be
> relatively easy to work with. I'm open to other ideas. I'm working
> primarily on linux.
>
> If you're aware of tutorials for either these specific to Fortran,
> please let me know. Searching doesn't appear to reveal much, other
> than "do it yourself by calling the C++ functions...". Even a
> simple example would get me over the "hump", considering I don't have
> much experience calling C++ functions/subroutines from Fortran.

I've been using Gnuplot with Fortran in my C-Graph project. The
Gnuplot home page is at <http://gnuplot.info/>. I found tutorials by
Kawano (Los Alamos National Lab) and Sastry (IBM) to be particularly
helpful. The urls are:

http://t16web.lanl.gov/Kawano/gnuplot/index-e.html
http://www.ibm.com/developerworks/library/l-gnuplot/


For information on calling gnuplot from Fortran, have a look at John
Mahaffy's course at Penn State:
<http://www.personal.psu.edu/users/j/h/jhm/f90/201.html>

Good luck!


agt
--
Freedom - no pane, all gaiGN!

Code Art Now
http://codeartnow.com
Email: a...@codeartnow.com

Gary Scott

unread,
Apr 11, 2009, 7:34:59 PM4/11/09
to
GINO: http://www.gino-graphics.com
Winteracter: http://www.winteracter.com

--

Gary Scott
mailto:garylscott@sbcglobal dot net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

If you want to do the impossible, don't hire an expert because he knows
it can't be done.

-- Henry Ford

Arjen Markus

unread,
Apr 12, 2009, 7:57:45 AM4/12/09
to
On 11 apr, 22:05, Ben <jben...@gmail.com> wrote:
> Hi,
>
> I'm looking for advice and, preferably, examples of how I can use
> Fortran to call some sort of graphics library such as SDL and/or
> Allegro -- these are the only two I've found so far that might be
> relatively easy toworkwith.  I'mopento other ideas.   I'm working

> primarily onlinux.
>
> If you're aware of tutorials for either these specific to Fortran,
> please let me know.   Searching doesn't appear to reveal much, other
> than "do it yourself by calling the C++ functions...".    Even a
> simple example would get me over the "hump", considering I don't have
> much experience calling C++ functions/subroutines from Fortran.
>
> Kind regards,
>
> -Ben
> p.s., in an unrelated question: is there a "free" non-commercial
> version of Intel Fortran Compiler for Windows as well?  Seems I've
> only seen the Linux version available...

Not sure what you mean by "easy to work with", but have a look at
PLplot:
http://plplot.sf.net - plenty of examples.

Regards,

Arjen

George White

unread,
Apr 12, 2009, 10:15:03 AM4/12/09
to
On Sat, 11 Apr 2009, Ben wrote:

> Hi,
>
> I'm looking for advice and, preferably, examples of how I can use
> Fortran to call some sort of graphics library such as SDL and/or
> Allegro -- these are the only two I've found so far that might be
> relatively easy to work with. I'm open to other ideas. I'm working
> primarily on linux.

What sort of graphics do you want? Are you looking to create publication
quality plots in .pdf or .eps format or do you want some complex display
updating in real-time or whatever? Do you need support for images, 3D,
contouring, etc or are you doing simple 2-D line art? Do you need
unicode fonts for annotations?

> If you're aware of tutorials for either these specific to Fortran,
> please let me know. Searching doesn't appear to reveal much, other
> than "do it yourself by calling the C++ functions...". Even a
> simple example would get me over the "hump", considering I don't have
> much experience calling C++ functions/subroutines from Fortran.

There are many languages that provide extensive graphics support, and many
are interpreted, which is generally an advantage for one-off graphics.
Some have provisions to call Fortran subroutines, so if you are using
Fortran because you need some subroutine library you are not limited to
using Fortran for graphics.

> Kind regards,
>
> -Ben
> p.s., in an unrelated question: is there a "free" non-commercial
> version of Intel Fortran Compiler for Windows as well? Seems I've
> only seen the Linux version available...

Ask Intel

--
George White <aa...@chebucto.ns.ca> <gn...@acm.org>
189 Parklea Dr., Head of St. Margarets Bay, Nova Scotia B3Z 2G6

baf

unread,
Apr 12, 2009, 1:10:26 PM4/12/09
to

dislin comes with plenty of example code. dislin.de

Luka Djigas

unread,
Apr 12, 2009, 4:38:33 PM4/12/09
to
On Sun, 12 Apr 2009 10:10:26 -0700, baf <b...@nowhere.net> wrote:

>>
>
>dislin comes with plenty of example code. dislin.de

I almost thought nobody was gonna mention it - DISLIN.

In my experience, a very good graphic package. It supports variety of
export formats, multi-lingual, is easy to use, its names of
subroutines are very intuitive and easy to remember (I cannot
emphasize enought the importance of this), and it is updated in
regular intervals.

pozdrav,
Luka

0 new messages