!______________________________________________________________________________ ! This program demonstrates how to use the Graphics module to plot 3D curves ! It plots the function z=sin(x)sin(y) both as a 2D color plot and as a surface !______________________________________________________________________________ PROGRAM DISLIN_test USE Graphics IMPLICIT NONE INTEGER, PARAMETER :: N=20 INTEGER :: i,j REAL, DIMENSION(N) :: X,Y REAL, DIMENSION(N,N) :: Z REAL :: pi=3.14159 X=2*pi*(REAL((/(i,i=1,N)/))/N-0.5) Y=X FORALL(i=1:N,j=1:N) Z(i,j)=SIN(X(i))*SIN(Y(j)) CALL InitGraphics("3D_test_color.tif","TIFF",(/"Example of 2D color plot"/),"x","y") CALL SurfPlot(X,Y,Z,'25R') CALL EndGraphics() CALL InitGraphics("3D_test_surf.tif","TIFF",(/"Example of 3D surface plot"/),"x","y","z=sin(x)sin(y)") CALL SurfPlot(X,Y,Z,'3SR') CALL EndGraphics() END PROGRAM DISLIN_test