3 #define TEMPLATE_WIDTH 1870
4 #define TEMPLATE_HEIGHT 17
6 #define OUTPUT_WIDTH 29.0
8 #define FACTOR (OUTPUT_WIDTH / (float)TEMPLATE_WIDTH)
9 #define XMIN (0 - (TEMPLATE_WIDTH / 2))
10 #define YMIN (TEMPLATE_HEIGHT / 2)
12 int main(int argc, char** argv) {
16 while((bit = getc(stdin)) != EOF) {
24 // parameters to sphere (in a blob) are: {<x, y, z>, diameter, center-density}
25 printf("sphere { <%f, %f, 0>, %f, 2 }\n", (float)(x * FACTOR), (float)(y * FACTOR), (float)(2.5 * FACTOR));