File: geomToObject.c

package info (click to toggle)
acm 5.0-23.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 8,364 kB
  • ctags: 4,793
  • sloc: ansic: 42,444; makefile: 706; cpp: 293; perl: 280; sh: 198
file content (32 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdio.h>

main () {

	int	pts, i, j, poly, tmp;
	int	count, idx;
	float	x, y, z;
	double	xd, yd, zd;

	scanf ("%d %d %d", &pts, &poly, &tmp);
	printf ("%d %d\n", pts, poly);

	for (i=0; i<pts; ++i) {
		scanf ("%g %g %g", &x, &y, &z);
		xd = y;
		yd = x;
		zd = -z;
		printf ("%d %g %g %g\n", i+1, xd, yd, zd);
	}

	for (i=0; i<poly; ++i) {
		scanf ("%d", &count);
		printf ("gray33 %d", count);
		for (j=0; j<count; ++j) {
			scanf ("%d", &idx);
			printf (" %d", idx);
		}
		printf ("\n");
	}

	exit (0);
}