washerboard( FILE *image, int nrows, int ncols, int nripples )
{
int r, c, gray ;
/* write out the pixel data */
for ( r=0; r<nrows; r++ )
{
for ( c=0; c<ncols; c++ )
{
gray = 127 + 127*cos( 2*M_PI*nripples*r/nrows );
fputc( gray, image );
}
}
}