125 |
|
|
126 |
|
printf("\nhand_paint polygon %s.hour_hand\n", name); |
127 |
|
printf("0\n0\n12\n"); |
128 |
< |
rvert(.06, -.03, -.03, hrot); |
129 |
< |
rvert(.06, .03, -.03, hrot); |
128 |
> |
rvert(.06, -.03, -.06, hrot); |
129 |
> |
rvert(.06, .03, -.06, hrot); |
130 |
|
rvert(.06, .025, .5, hrot); |
131 |
|
rvert(.06, -.025, .5, hrot); |
132 |
|
|
133 |
|
printf("\nhand_paint polygon %s.minute_hand\n", name); |
134 |
|
printf("0\n0\n12\n"); |
135 |
< |
rvert(.07, -.02, -.04, mrot); |
136 |
< |
rvert(.07, .02, -.04, mrot); |
135 |
> |
rvert(.07, -.02, -.1, mrot); |
136 |
> |
rvert(.07, .02, -.1, mrot); |
137 |
|
rvert(.07, .01, .9, mrot); |
138 |
|
rvert(.07, -.01, .9, mrot); |
139 |
|
} |
142 |
|
rvert(x, y, z, ang) /* print rotated vertex */ |
143 |
|
double x, y, z, ang; |
144 |
|
{ |
145 |
< |
double sa, ca; |
145 |
> |
static double lastang=0, sa=0, ca=1; |
146 |
|
|
147 |
< |
sa = sin(-ang); |
148 |
< |
ca = cos(-ang); |
147 |
> |
if (ang != lastang) { |
148 |
> |
sa = sin(-ang); |
149 |
> |
ca = cos(-ang); |
150 |
> |
lastang = ang; |
151 |
> |
} |
152 |
|
printf("%15.12g %15.12g %15.12g\n", x, y*ca-z*sa, z*ca+y*sa); |
153 |
|
} |