# Appendix B: Examples

## B.12 Surface Plot (SURFUN)

                PROGRAM EXA_11
          C     USE DISLIN         for Fortran 90!
                CHARACTER*60 CTIT1,CTIT2
                EXTERNAL ZFUN

                CTIT1='Surface Plot (SURFUN)'
                CTIT2='F(X,Y) = 2*SIN(X)*SIN(Y)'

                CALL SETPAG('DA4P')
                CALL DISINI
                CALL PAGERA
                CALL COMPLX

                CALL AXSPOS(200,2600)
                CALL AXSLEN(1800,1800)

                CALL NAME('X-axis','X')
                CALL NAME('Y-axis','Y')
                CALL NAME('Z-axis','Z')

                CALL TITLIN(CTIT1,2)
                CALL TITLIN(CTIT2,4)

                CALL VIEW3D(-5.,-5.,4.,'ABS')
                CALL GRAF3D(0.,360.,0.,90.,0.,360.,0.,90.,-3.,3.,-3.,1.)
                CALL HEIGHT(50)
                CALL TITLE

                CALL SURFUN(ZFUN,1,10.,1,10.)

                CALL DISFIN
                END

                FUNCTION ZFUN(X,Y)
                FPI=3.14159/180.
                ZFUN=2*SIN(X*FPI)*SIN(Y*FPI)
                END

Figure B.12: Surface Plot

Next | Previous | Contents