Sample programs


The following is obsoleted and left for reference only. Similar sample programs are availabe with the latest version of GrWin.


ALL the TrueBASIC programs listed in this excellent text on simulations in physics have been converted to C and Fortran77 based on the GrWin Graphics Library for graphics.


Table of Sample Programs

To execute one of the following sample programs directly from the network, it is necessary to activate grwnd.exe beforehand or download grwnd.exe to a folder passed by the path. All the files necessary to run the sample programs in the list below are compressed in a zip file.


source file exe size description
bitmap.f bitmap.exe 162,262 an example of handling bitmap files(*1)
gwdemo17.f gwdemo17.exe 163,955 an animation of a rotating polyhedron(ported from pgdemo17.f of the pgplot demos)
bounce.f bounce.exe 159,141 a bouncing ball(?) animation(*2)
dspexf.f dspexf.exe 158,793 an example of Poincare plot of a damped simple pendurum in periodic external field, etc.
dp.f dp.exe 170,924 an animation of caotic motion of a double pendurum
mixmodes.f mixmodes.exe 159,143 an example of mixing of the three primary colors and mixing mode
mlwndws.f mlwndws.exe 161,557 an example of multiple window manipulations
penrose.c penrose.exe 117,953 a Penrose tyling example using tortois graphics in single precision
penrose_d.c penrose_d.exe 117,953 a Penrose tyling example using tortois graphics in double precision
polygon.f polygon_f.exe 152,962 drawing a polygon using GWLINE (Fortran)
polygon.c polygon.exe 106,511 drawing a polygon using GWLINE (C)
sample1.f sample1.exe 119,469 an example using Calcomp routines
sample2.f sample2.exe 120,054 I/O of graphycs data in gwd format, etc.
shot.f shot.exe 161,432 parabolic motion of an object in the presence of air resistance
soliton.f soliton.exe 161,318 an animation of a collision of two solitons
tblfonts.f tblfonts.exe 114,762 a character code table of specified fon
trigfn.f trigfn.exe 155,108 an example of plotting trigonometric functions and reading mouse coordinates
tstmlvp.f tstmlvp.exe 144,072 an example of using multiple viewports
tstttsmrk.f tstttsmrk.exe 156,114 an examples of using tortois graphics
tstwinapp.c tstwinapp.exe 109,421 a simple example of windows applications

(*1)To run bitmap.exe you need jonathan1.bmp and ball.bmp.

(*2)To run bounce.exe you need jonathan1.bmp and jonathan2.bmp.


Tsuguhiro TAMARIBUCHI <tamari@grwin.com>

Last modified:  Tue Jun 10 23:00:00 JST 2003