From 64c85dfc1d3b546dd4b5f84168e9256817f3a741 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 20 Feb 2014 02:46:41 +0100 Subject: clean up source directory --- src/makepic.c | 62 ----------------------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 src/makepic.c (limited to 'src/makepic.c') diff --git a/src/makepic.c b/src/makepic.c deleted file mode 100644 index 5c54cbd..0000000 --- a/src/makepic.c +++ /dev/null @@ -1,62 +0,0 @@ -//#define MUENCHEN -//#define MAGDEBURG -#define BREMEN - -#ifdef MUENCHEN -/* Muenchen */ -#define GEOXMIN 5295821.0 -#define GEOXMAX 5334858.0 -#define GEOYMIN 3233408.0 -#define GEOYMAX 3270042.0 -#endif - -#ifdef MAGDEBURG -/* Magdeburg */ -#define GEOXMIN 5305003.0 -#define GEOXMAX 5316797.0 -#define GEOYMIN 3682236.0 -#define GEOYMAX 3704266.0 -#endif - -#ifdef BREMEN -/* Bremen */ -#define GEOXMIN 5098053.0 -#define GEOXMAX 5134674.0 -#define GEOYMIN 3784147.0 -#define GEOYMAX 3819770.0 -#endif - -#define GEOXSIZE (GEOXMAX - GEOXMIN) -#define GEOYSIZE (GEOYMAX - GEOYMIN) - -#define PICXSIZE (2*768.0) -#define PICYSIZE (2*768.0) - -#include -#include - -int main( int args, char **argv) -{ - unsigned long pic[ (long)(PICXSIZE * (PICYSIZE+10)) ]; - char line[1024]; - int x, y; - - double xscale = (PICXSIZE / GEOXSIZE), - yscale = (PICYSIZE / GEOYSIZE); - double scale = xscale > yscale ? yscale : xscale; - - memset( pic, 0, sizeof( pic)); - - while( scanf( "%ld\t%ld\n", &x, &y) == 2) - { - double myx = x - GEOXMIN, myy = GEOYSIZE - (y - GEOYMIN); - if( (x < GEOXMAX) && (x >= GEOXMIN) && (y < GEOYMAX) && (y >= GEOYMIN)) - pic[ (long)(((long)(myx * scale)) + ((long)( myy * scale )) * (long)PICXSIZE) ]++; - } - - printf( "P5\n%ld %ld\n255\n", (long)PICXSIZE, (long)PICYSIZE ); - for( x = 0; x < PICXSIZE * PICYSIZE; x++) - putchar( sqrt( 32*256*256 * pic[ x ])); - - return 0; -} -- cgit v1.2.3