Add --xyz option to plot_image.py for reading in (x,y,z) tuples.
[parallel_computing.git] / src / plot_image / gen_data_sharp.c
index c0abf3e14161296ee2ef8c1d6d61b99b2baceabf..9e7e6d9c830fab4bf703b5beea9cfee351fea7d1 100644 (file)
@@ -1,19 +1,21 @@
 #include <stdio.h>
 #include <math.h>
 
-#define N_X 300
-#define N_Y 200
+#define N_X 200
+#define N_Y 100
 
 main()
 {
        int i, j;
        double x, y, value;
 
+       printf("# x\ty\tz\n");
+
        for (j = 0; j < N_Y; j++)
                for (i = 0; i < N_X; i++) {
                        value = 0.0;
                        if (j > N_Y / 2)
                                value = 1.5;
-                       printf("%f\n", value);
+                       printf("%d\t%d\t%f\n", i, j, value);
                }
 }