#include #include int main() { float *val; float sval[100]; float **threed; int points = 100; float period = 2*M_PI; int count, count2; val = (float*) malloc(points*sizeof(float)); for (count = 0; count < points; count++) { val[count] = sin(count * period/(float)points); sval[count] = val[count]; } threed = (float**)malloc(points*sizeof(float)); float x,y; for (count = 0; count < points; count++) { threed[count] = (float*)malloc(points*sizeof(float)); for (count2 = 0; count2 < points; count2++) { x = count*period/(float)points; y = count2*period/(float)points; threed[count][count2] = 1.0f/(x+y)*sin(x+y); } } /* Normally, we would write the generated data into a file or so. */ printf("Value tables created\n"); return 0; }