FRIEZE
2D Transfinite Interpolation
FRIEZE
is a FORTRAN90 program which
demonstrates how to "tile" a 2D region with a given pattern.
We assume that the 2D region has already been subdivided into
subregions, not necessarily rectilinear or equal in size or shape.
Thus, we need to twist and squash and stretch the pattern tile
to fit each of the subregions.
We used this program as a first mockup of
a 3D brain simulation. We wanted to see if we could make a pattern
repeat throughout a region, and match up at the boundaries of the
(curving) sub-cells.
Licensing:
The computer code and data files made available on this web page
are distributed under
the GNU LGPL license.
Languages:
FRIEZE is available in
a FORTRAN90 version
Related Data and Programs:
BLEND,
a FORTRAN90 library which
implements blended mapping or transfinite interpolation.
PS_WRITE,
a FORTRAN90 library which
can create PostScript images.
TILER_2D,
a FORTRAN90 program which
demonstrates a 2D example of transfinite interpolation.
TILER_3D,
a FORTRAN90 program which
demonstrates a 3D example of transfinite interpolation.
Reference:
-
William Gordon, Charles Hall,
Construction of Curvilinear Coordinate Systems and Application to
Mesh Generation,
International Journal of Numerical Methods in Engineering,
Volume 7, pages 461-477, 1973.
-
Joe Thompson, Bharat Soni, Nigel Weatherill,
Handbook of Grid Generation,
CRC Press, 1999.
Source Code:
Examples and Tests:
-
region.png,
a PNG image of
the region;
-
cells.png,
a PNG image of
the region divided into cells;
-
pattern.png,
a PNG image of
the wallpaper pattern.
Each cell of the region is to be covered by a copy of this
pattern;
-
frieze.png,
a PNG image of
the "wallpapered" region;
List of Routines:
-
MAIN is the main program for FRIEZE.
-
BLEND1D2D uses transfinite interpolation on a 2D cell.
-
BOUNDARY_2D returns (X,Y) points on a side of the boundary.
-
CH_CAP capitalizes a single character.
-
DRAW_CELL draws the borders of a given cell.
-
DRAW_CELLS makes an image of the cells that make up the region.
-
DRAW_DIAGONALS draws the diagonals of the entire region.
-
DRAW_FRIEZE draws the frieze.
-
DRAW_PATTERN draws the pattern that will be repeated in the frieze.
-
DRAW_REGION makes an image of the region.
-
DRAW_PAT draws a copy of the pattern.
-
I4_SWAP swaps two I4's.
-
PATTERN defines the tiling pattern.
-
PS_COLOR_LINE handles the line color.
-
PS_COLOR_LINE_SET sets the line color.
-
PS_COMMENT inserts a comment into the PostScript file.
-
PS_DEFAULT sets the internal settings to their default values
-
PS_FILE_CLOSE closes a PostScript file.
-
PS_FILE_HEAD writes header information to a PostScript file.
-
PS_FILE_OPEN opens a new version of a PostScript file with a given name.
-
PS_FILE_TAIL writes trailer information to a PostScript file.
-
PS_LINE_CLOSED adds the graph of a closed line to a PostScript file.
-
PS_LINE_OPEN adds the graph of a line to a PostScript file.
-
PS_PAGE_HEAD writes header information on a new page.
-
PS_PAGE_TAIL writes tail information at the end of a page.
-
PS_SETTING_INT sets, gets, or prints integer internal PS_WRITE parameters.
-
PS_SETTING_REAL sets, gets, or prints real internal PS_WRITE parameters.
-
R8_SWAP swaps two real values.
-
S_EQI is a case insensitive comparison of two strings for equality.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
TIMESTRING writes the current YMDHMS date into a string.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 27 November 2006.