Level Connector 1.0beta Reads RAW or ASCII pgm file from stdin or from file specified in command line and writes binary pgm file to stdout. The input is treated as height field and the heights of pixels marked as free are calculated so that different levels are connected smoothly. The heights are found by solving Poisson's 2nd order differential equation in the free areas using modified Gauss-Seidel algorithm. Gauss-Seidel iteration calculates approximations for the [free] pixels based on previous values. [Inithgt] is used as the first approximation. The iteration stops when [maxiter] iterations are made or maximum difference between iterations is less than [limres]. If max difference reported by [stat] is much greater than 1 it means that the approximation is far from the final value and [maxiter] should be increased. That is, if a better solution for the Poisson's equation is desired. If the input file contains no fixed areas inside free areas then the approximations go towards flat surface and [limres] should be set to 0.0. The iteration is in this case controlled by [maxiter] only. [Force] pushes the free areas upwards. Values greater than ~2 give unpredictable resuls. Negative force pushes downwards. If a pgm is generated using > giftopnm foo.gif| ppmtopgm > foo.pgm it may not preserve the original levels and some guessing is required to find the right [free] value. > giftoppm foo.gif| ppmtopgm > foo.pgm works fine. Remember to sort the colormap if you convert to gif. Kari Kivisalo kkivisal@vipunen.hut.fi http://www.hut.fi/~kkivisal/