Color graphics file format.
The color graphics files created by IBIS consist of (height * width) + nbytes bytes. The bytes correspond to integers numbered from to 255. Those integers are assigned colors in the postprocessing programs.
The files are written with FORTRAN code of the following form:
c c alpha contains the byte map for graphics display (size nxx by nyy) c byte alpha(nxx,nyy) c open(unit=10,file=path/image.xxxx,form='unformatted') write(10) alpha close(10) cThe dimensions of alpha are set in a parameter statement in the include file parm.inc. For example, for the balloons.ibis simulation parm.inc contains the line
parameter(nxx=128,nyy=256)In this case, the file that is created contains bytes, where nbytes is usually 8 (which corresponds to one 4 byte word at the beginning and end of the file). Unfortunately, there is no FORTRAN standard for nbytes. To test for the size of nbytes on a given system, run ibis on balloons.ibis and determine the size of binary/balloon.0000 with the ls -l command. The number field preceeding the month, call it tbytes, corresponds to the number of bytes in the file, and If , then it may be useful to edit the postprocessing codes to reflect this fact. All of the codes are clearly documented on this point, and the relevant variables contain the words skip and byte. Use the Unix program grep to find all occurences.
Color graphics color assignment scheme.
Every byte in the color graphics files will mark a pixel on the screen,
so each byte is associated with a color. This is accomplished by assigning
one integer from to 255 to every byte or pixel. The color corresponding
to that integer is contained in a file called a color map. The color map file
consists of 256 lines (each defining a color). Each line consists of three
integers from to 255 and the integers specify the red, green and blue
values of that color. The basics of rgb color systems can be reviewed
in [#!??!#]. IBIS numbers the bytes by the following convention:
In future versions of IBIS, more sophisticated fluid marker particle coloring is planned where particles will be allowed to have different colors. This would, for example, allow one to identify the origin of a particle.