| 29 | } |
| 30 | |
| 31 | int main() { |
| 32 | const size_t point_count = 10000; |
| 33 | |
| 34 | struct point shape_points [3] = {{0.0,0.0}, {0.5,sqrt(0.75)}, {1.0,0.0}}; |
| 35 | struct point out_points[point_count]; |
| 36 | |
| 37 | srand((unsigned int)time(NULL)); |
| 38 | |
| 39 | chaos_game(shape_points, 3, out_points, point_count); |
| 40 | |
| 41 | FILE *fp = fopen("sierpinksi.dat", "w+"); |
| 42 | |
| 43 | for (size_t i = 0; i < point_count; ++i) { |
| 44 | fprintf(fp, "%f\t%f\n", out_points[i].x, out_points[i].y); |
| 45 | } |
| 46 | |
| 47 | fclose(fp); |
| 48 | |
| 49 | return 0; |
| 50 | } |
nothing calls this directly
no test coverage detected