Definition at line 90 of file mainConceptSupport.cpp. References FormatError(). 00092 { 00093 FILE* fp = fopen(fileName, "w"); 00094 if (!fp) 00095 FormatError("Could not open file for writing\n"); 00096 fprintf(fp, "%d\n%f %f %f %f\n", maxNr, minX, maxX, minY, maxY); 00097 for (int i=0; i<maxNr; i++) 00098 { 00099 float x1 = (130 * sin(i/30.) + 20 - rand()%40) + 150; 00100 float y1 = (130 * cos(i/30.) + 20 - rand()%40) + 150; 00101 float ptX = x1 / (maxX-minX); 00102 float ptY = y1 / (maxY-minY); 00103 00104 char buf[512]; 00105 sprintf(buf, "%s%d.jpg ", imageName, i+1); 00106 fprintf(fp, " %s %f %f %d\n", buf, ptX, ptY, i%8); 00107 } 00108 }
Here is the call graph for this function:
|