#include #include #include // Generates a random POVRAY colormap // Syntax: colmap // <"""_green> <"""blue> int main(int argc, char *argv[]) { int steps = 10, i, var, rvar, gvar, bvar, dvar; float incr, keyval, v, r, g, b, randomd, randomv; if (argc>1) steps =atoi(argv[1]); if (!steps) steps = 10; if (argc>2) var = atoi(argv[2]); else var = 100; if (argc>3) dvar = atoi(argv[3]); else dvar = 20; if (argc>4) rvar = atoi(argv[4]); else rvar = 10; if (argc>5) gvar = atoi(argv[5]); else gvar = 10; if (argc>6) bvar = atoi(argv[6]); else bvar = 10; incr = (float) 1.0 / (float) steps; // printf("Steps: %d\n",steps); printf("#declare rock_map = \ncolor_map {\n"); v = (float) ((float) var) / (float) 100.0; // printf("V: %f\n",v); for (i=0; i]\n", keyval,randomd,r,g,b); } printf("}\n"); }