adspace
Write a routine to implement the polymarker function
Answer Posted / Nilesh Nishant
Here's an example of a polymarker function in C:nnvoid polyMarker(int x, int y, int size, int n_points) {n int i, j;n for (i = 0; i < n_points; i++) {n int a = i * (size / n_points);n for (j = -a; j <= a; j++) {n int x_coord = x + j;n int y_coord = y + size - abs(j - a);n printf("%d %d
", x_coord, y_coord);n }n }n}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers