Content:
Öğr.Gör.Ahmet Bingül
bingul@gantep.edu.tr
Introduction
One can use the graphics utilities to draw anything by Profor Fortran77 compiler. Click here to download the compiler.
A seperate library ( F77PC library ) contains all the essential graphics primitives necessary to drive the Hercules, CGA , EGA and VGA screens for graph plotting.
Drawing Screen
Top-Left of the graphic screen is (0,0) and rigth-bottom is (649,479) if secreenmode is selected to be 18.Drawing Functions
sets the current drawing color ____________________ Color ¦Value --------------+----- BLACK ¦ 0 BLUE ¦ 1 GREEN ¦ 2 CYAN ¦ 3 RED ¦ 4 MAGENTA ¦ 5 BROWN ¦ 6 LIGHTGRAY ¦ 7 DARKGRAY ¦ 8 LIGHTBLUE ¦ 9 LIGHTGREEN ¦ 10 LIGHTCYAN ¦ 11 LIGHTRED ¦ 12 LIGHTMAGENTA ¦ 13 YELLOW ¦ 14 WHITE ¦ 15 --------------------
Function | Description | Example |
CALL PLOT(X,Y,C) | plots a pixel at a specified point in the color C at point (X,Y) . | plot example |
CALL DRAW(X1,X2,Y1,Y2,C) | draws a line from point (X1,Y1) to point (X2,Y2) in the color C | draw example |
CALL CIRCLE(X,Y,R,C) | draws a circle, whose center point is (X,Y) and whose radius is R , in the color C | circle example |
Example Applications
Description | Program Code | Output |
Draws/Deletes concentrate circles | c-circles.for | c-circles.gif |
Draws the function y=f(x) | function.for | function.gif |
Plots linear spline functions for the given data file(data.txt) | linear-spline.for | linear-spline.gif |
Plots best fit line for the given data file(data.txt) | linear-lsf.for | linear-lsf.gif |
Plots best fit line for the given data file(data.txt) and creates PostScript file | linear-lsf-ps.for | linear-lsf-ps.eps |
Projects