3 Copyright (C) 2001-2003 Paolo Martella
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
29 static GLuint width
=800;
30 static GLuint height
=600;
31 static bool init
=true;
32 static bool first
=true;
33 static GLfloat a_time
=0.0f
;
35 static Texture
* a_Text
;
36 static GLuint numtexs
=5;
41 static bool switcher
=false;
42 static float gendep
=1.55;
43 static const int size
=64;
44 static float norm
[size
][size
][3];
45 static float a_points
[size
][size
][3];
46 static float camera
[3]={-12.8,12.8,5};
47 static float cameraray
[3];
49 static float newcoord
[size
][size
][2];
50 static GLfloat coeff
=7.1f
;
52 static float a_float_x
, a_float_y
, a_float_xb
, a_float_yb
;
53 static GLfloat a_xrot
;
54 static GLfloat a_yrot
;
55 static GLfloat a_zrot
;
56 static GLfloat a_rad
=0.0f
;
57 static GLfloat quantos
=-1.0f
;
58 static GLfloat a_zeta
=-1.0f
;
59 static GLfloat a_factor
=10.0f
;
61 static const int a_num
=200;
68 GLfloat speed
,speedlim
;
75 static a_part parts
[a_num
];
78 static GLfloat a_counter
=0;
82 static GLfloat a_diffuse
[]= {0.2f
, 0.2f
, 0.2f
, 1.0f
};
83 static GLfloat a_ambient
[]= {0.1f
, 0.1f
, 0.1f
, 1.0f
};
84 static GLfloat a_specular
[]= {.750f
, .750f
, .750f
, 1.0f
};
85 static GLfloat a_emission
[]= {0.2f
, 0.2f
, 0.2f
, 1.0f
};
87 static GLfloat a_shininess
= 10.0f
;
89 static GLfloat a_LightAmbient
[]= { 0.5f
, 0.5f
, 0.5f
, 1.0f
};
90 static GLfloat a_LightDiffuse
[]= { 0.5f
, 0.5f
, 0.5f
, 1.0f
};
91 static GLfloat a_LightSpecular
[]= { .5f
, .5f
, .5f
, 1.0f
};
92 static GLfloat a_LightPosition
[]= { 0.0f
, 8.0f
, -20.0f
, 1.0f
};
93 static GLfloat a_Sinus
[3];
96 void copy(float vec0
[3], float vec1
[3])
103 void sub(float vec0
[3], float vec1
[3], float vec2
[3])
105 vec0
[0] = vec1
[0] - vec2
[0];
106 vec0
[1] = vec1
[1] - vec2
[1];
107 vec0
[2] = vec1
[2] - vec2
[2];
110 void add(float vec0
[3], float vec1
[3], float vec2
[3])
112 vec0
[0] = vec1
[0] + vec2
[0];
113 vec0
[1] = vec1
[1] + vec2
[1];
114 vec0
[2] = vec1
[2] + vec2
[2];
117 void scalDiv(float vec
[3], float c
)
119 vec
[0] /= c
; vec
[1] /= c
; vec
[2] /= c
;
122 void cross(float vec0
[3], float vec1
[3], float vec2
[3])
124 vec0
[0] = vec1
[1] * vec2
[2] - vec1
[2] * vec2
[1];
125 vec0
[1] = vec1
[2] * vec2
[0] - vec1
[0] * vec2
[2];
126 vec0
[2] = vec1
[0] * vec2
[1] - vec1
[1] * vec2
[0];
129 void normz(float vec
[3])
131 float c
= sqrt(vec
[0] * vec
[0] + vec
[1] * vec
[1] + vec
[2] * vec
[2]);
135 void set(float vec
[3], float x
, float y
, float z
)
146 float a
[3],b
[3],c
[3];
148 for(i
=0; i
<size
; i
++)
149 for(j
=0; j
<size
; j
++)
151 if (i
!=size
-1 && j
!=size
-1)
153 sub(a
, a_points
[i
][j
+1], a_points
[i
][j
]);
154 sub(b
, a_points
[i
+1][j
], a_points
[i
][j
]);
158 sub(a
, a_points
[i
][j
-1], a_points
[i
][j
]);
159 sub(b
, a_points
[i
-1][j
], a_points
[i
][j
]);
165 if (i
==0 && j
==size
-1)
167 sub(a
, a_points
[i
][j
-1], a_points
[i
][j
]);
168 sub(b
, a_points
[i
+1][j
], a_points
[i
][j
]);
173 c
[0]=-c
[0]; c
[1]=-c
[1]; c
[2]=-c
[2];
176 if (i
==size
-1 && j
==0)
178 sub(a
, a_points
[i
-1][j
], a_points
[i
][j
]);
179 sub(b
, a_points
[i
][j
+1], a_points
[i
][j
]);
191 glDisable(GL_LIGHT0
);
193 a_gets
=0;a_timecyc
=0;
195 cameraray
[0]=0;cameraray
[1]=0;cameraray
[2]=0;
196 rray
[0]=0;rray
[1]=0;rray
[2]=0;
197 a_x
=0;a_y
=0;a_float_x
=0;a_float_y
=0;a_float_xb
=0;a_float_yb
=0;
198 a_xrot
=0;a_yrot
=0;a_zrot
=0;a_rad
=0.0f
;
211 a_diffuse
[0]=0.2f
;a_diffuse
[1]=0.2f
;a_diffuse
[2]=0.2f
;a_diffuse
[3]=1.0f
;
212 a_ambient
[0]=0.1f
;a_ambient
[1]=0.1f
;a_ambient
[2]=0.1f
;a_ambient
[3]=1.0f
;
213 a_specular
[0]=.75f
;a_specular
[1]=.75f
;a_specular
[2]=.75f
;a_specular
[3]=1.0f
;
214 a_emission
[0]=0.2f
;a_emission
[1]=0.2f
;a_emission
[2]=0.2f
;a_emission
[3]=1.0f
;
218 a_LightAmbient
[0]=0.5f
;a_LightAmbient
[1]=0.5f
;a_LightAmbient
[2]=0.5f
;a_LightAmbient
[3]=1.0f
;
219 a_LightDiffuse
[0]=0.5f
;a_LightDiffuse
[1]=0.5f
;a_LightDiffuse
[2]=0.5f
;a_LightDiffuse
[3]=1.0f
;
220 a_LightSpecular
[0]=.5f
;a_LightSpecular
[1]=.5f
;a_LightSpecular
[2]=.5f
;a_LightSpecular
[3]=1.0f
;
221 a_LightPosition
[0]=0.0f
;a_LightPosition
[1]=8.0f
;a_LightPosition
[2]=-20.0f
;a_LightPosition
[3]=1.0f
;
247 glMatrixMode(GL_PROJECTION
);
249 gluPerspective(45.0f
,(GLfloat
)width
/(GLfloat
)height
,0.1f
,100.0f
);
250 glMatrixMode(GL_MODELVIEW
);
253 glShadeModel(GL_SMOOTH
);
254 glClearColor(0.0f
, 0.0f
, 0.0f
, 0.5f
);
256 glEnable(GL_DEPTH_TEST
);
257 glDepthFunc(GL_LEQUAL
);
258 glHint(GL_PERSPECTIVE_CORRECTION_HINT
, GL_NICEST
);
261 a_Text
=new Texture
[numtexs
];
262 a_Text
[1].Load("data/logoxs.raw");
263 a_Text
[2].Load("data/white.raw");
264 a_Text
[3].Load("data/sun2.raw");
265 a_Text
[4].Load("data/star.raw");
267 glEnable (GL_LIGHTING
);
268 glEnable (GL_LIGHT1
);
270 glLightfv(GL_LIGHT1
,GL_DIFFUSE
,a_LightDiffuse
);
271 glLightfv(GL_LIGHT1
,GL_AMBIENT
,a_LightAmbient
);
272 glLightfv(GL_LIGHT1
,GL_SPECULAR
,a_LightSpecular
);
273 glLightfv(GL_LIGHT1
,GL_POSITION
,a_LightPosition
);
275 glMaterialfv(GL_FRONT
,GL_DIFFUSE
,a_diffuse
);
276 glMaterialfv(GL_FRONT
,GL_AMBIENT
,a_ambient
);
277 glMaterialfv(GL_FRONT
,GL_SPECULAR
,a_specular
);
278 glMaterialf(GL_FRONT
,GL_SHININESS
,10.0f
);
280 glPolygonMode(GL_FRONT_AND_BACK
, GL_FILL
);
281 glEnable(GL_TEXTURE_2D
);
282 for (int a_x
=0;a_x
<size
;a_x
++)
284 for (int a_y
=0; a_y
<size
;a_y
++)
286 a_points
[a_x
][a_y
][0]=float(a_x
/(1.25f
*size
/32));
287 a_points
[a_x
][a_y
][1]=float(a_y
/(1.25f
*size
/32));
288 a_points
[a_x
][a_y
][2]=0.0;
292 for (int p
=0; p
<a_num
; p
++)
294 parts
[p
].r
=128+rand()%128;
295 parts
[p
].g
=128+rand()%128;
296 parts
[p
].b
=128+rand()%128;
298 parts
[p
].angle
=rand()%90;
300 parts
[p
].speedlim
=.005+.0001*((GLfloat
)(rand()%1000));
301 parts
[p
].speed
=parts
[p
].speedlim
;
308 glBlendFunc(GL_SRC_ALPHA
,GL_ONE
);
311 glDisable(GL_DEPTH_TEST
);
327 int time
=(int)a_time
*500-2;//**********************************************
329 for (int a
=0; a
<a_num
; a
++)
333 void a_drawquad(GLfloat size
)
336 glTexCoord2f(0.0f
, 0.0f
);
337 glVertex3f(-.5*size
,-.5*size
,0);
338 glTexCoord2f(1.0f
, 0.0f
);
339 glVertex3f(-.5*size
,.5*size
,0);
340 glTexCoord2f(1.0f
, 1.0f
);
341 glVertex3f(.5*size
,.5*size
,0);
342 glTexCoord2f(0.0f
, 1.0f
);
343 glVertex3f(.5*size
,-.5*size
,0);
347 void calcul(int xx
,int yy
)
349 if ((xx
==0)&&(yy
==0)) MakeNorm();
350 sub(cameraray
,camera
,a_points
[xx
][yy
]);
352 rray
[0]=norm
[xx
][yy
][0]*coeff
+cameraray
[0];
353 rray
[1]=norm
[xx
][yy
][1]*coeff
+cameraray
[1];
354 rray
[2]=norm
[xx
][yy
][2]*coeff
+cameraray
[2];
358 GLfloat depth
=gendep
+a_points
[xx
][yy
][2];
359 GLfloat t
=depth
/rray
[2];
360 GLfloat mapx
=a_points
[xx
][yy
][0]+rray
[0]*t
;
361 GLfloat mapz
=a_points
[xx
][yy
][1]+rray
[1]*t
;
363 newcoord
[xx
][yy
][0]=-(mapx
-a_points
[0][0][0])/25.6;
364 newcoord
[xx
][yy
][1]=(mapz
-a_points
[size
][size
][1])/25.6;
368 bool a_DrawGLScene(GLfloat globtime
)
370 if (init
) {a_InitGL();init
=false;}
371 a_time
=2.0+globtime
*.01;
375 a_zeta
=25.0f
*cos((3.1415f
/2.0f
)*(1+a_time
/10.0f
));
376 a_xrot
=-45.0f
*cos((3.1415f
/2.0f
)*(1+a_time
/10.0f
));
380 a_xrot
=45.0f
-30.0f
*sin((a_time
-10.0f
)/20.0f
)*sin((a_time
-10.0f
)/20.0f
);
381 a_zrot
=360.0f
*sin((a_time
-10.0f
)/50.0f
)*sin((a_time
-10.0f
)/50.0f
);
382 a_zeta
=-25.0f
+5.0f
*sin((a_time
-10.0f
)/10.0f
)*sin((a_time
-10.0f
)/10.0f
);
385 if (a_time
>90.0f
) a_zeta
=-20.0f
+10.0f
*(1.0f
-cos((a_time
-90.0f
)*3.1415f
/10.0f
));
387 if (a_zeta
>-2.5f
) a_zeta
=-2.5f
;
388 a_factor
=(a_xrot
/.5+20)/50.0f
;
390 if (a_mod
>0.5f
) a_mod
=1.0-.03f
*(a_time
-a_gets
); else a_mod
=.5-0.015f
*(a_time
-a_gets
);
391 if (a_mod
<0.0f
) a_mod
=0.0f
;
392 glDisable(GL_TEXTURE_2D
);
394 glTranslatef(0,0,-5);
395 glBlendFunc(GL_SRC_ALPHA
, GL_ONE_MINUS_SRC_ALPHA
);
396 if (a_zeta
>-20.0f
) glColor4f(0,0,0,-(a_zeta
+20.0f
)/40.0f
+.25f
);
397 else glColor4f(0,0,0,.25f
);
398 glDisable(GL_LIGHTING
);
401 if (first
)//a_time<3.01f)
404 glColor4ub(255,255,255,255);
411 glColor4f(1.0f
,1.0f
,1.0f
,(a_time
-95.0f
)/1.5f
);
414 glEnable(GL_TEXTURE_2D
);
415 glBlendFunc(GL_SRC_ALPHA
,GL_ONE
);
416 glEnable(GL_LIGHTING
);
418 if (a_time
>30.0) glTranslatef(0.0f
,1.5f
,a_zeta
);
419 else glTranslatef(0.0f
,.5+.5f
*(1.0-cos((a_time
-2.0f
)*3.1415f
/28.0f
)),a_zeta
);
420 glRotatef(-90+2*a_xrot
,1.0f
,0.0f
,0.0f
);
421 glRotatef(a_yrot
,0.0f
,1.0f
,0.0f
);
422 glRotatef(a_zrot
,0.0f
,0.0f
,1.0f
);
425 for (int a_xx
=0; a_xx
<size
; a_xx
++) for (int a_yy
=0; a_yy
<size
; a_yy
++)
433 raggio
=.5*sqrt((double)((a_points
[a_xx
][a_yy
][0]-a_points
[size
/2][size
/2][0])*(a_points
[a_xx
][a_yy
][0]-a_points
[size
/2][size
/2][0])
434 +(a_points
[a_xx
][a_yy
][1]-a_points
[size
/2][size
/2][1])*(a_points
[a_xx
][a_yy
][1]-a_points
[size
/2][size
/2][1])));
435 arg
=2.5*raggio
-quantos
*2+30;
436 if ((arg
<-2*6.28)||(arg
>4*6.28)) value
=0; else
437 value
=.05*sin(arg
)*sin(arg
)*exp(arg
/7);
438 a_points
[a_xx
][a_yy
][2]=value
;
442 raggio
=.5*sqrt((double)((a_points
[a_xx
][a_yy
][0]-a_points
[48][48][0])*(a_points
[a_xx
][a_yy
][0]-a_points
[48][48][0])
443 +(a_points
[a_xx
][a_yy
][1]-a_points
[48][48][1])*(a_points
[a_xx
][a_yy
][1]-a_points
[48][48][1])));
444 arg
=2.5*raggio
-(quantos
-10)*3+30;
445 if ((arg
<-2*6.28)||(arg
>4*6.28)) value
=0; else
446 value
=.025*sin(arg
)*sin(arg
)*exp(arg
/7);
447 a_points
[a_xx
][a_yy
][2]+=value
;
451 raggio
=.5*sqrt((double)((a_points
[a_xx
][a_yy
][0]-a_points
[50][22][0])*(a_points
[a_xx
][a_yy
][0]-a_points
[50][22][0])
452 +(a_points
[a_xx
][a_yy
][1]-a_points
[50][22][1])*(a_points
[a_xx
][a_yy
][1]-a_points
[50][22][1])));
453 arg
=3.0*raggio
-(quantos
-24)*4+30;
454 if ((arg
<-2*6.28)||(arg
>4*6.28)) value
=0; else
455 value
=.02*sin(arg
)*sin(arg
)*exp(arg
/7);
456 a_points
[a_xx
][a_yy
][2]+=value
;
460 raggio
=.5*sqrt((double)((a_points
[a_xx
][a_yy
][0]-a_points
[32][32][0])*(a_points
[a_xx
][a_yy
][0]-a_points
[32][32][0])
461 +(a_points
[a_xx
][a_yy
][1]-a_points
[32][32][1])*(a_points
[a_xx
][a_yy
][1]-a_points
[32][32][1])));
462 arg
=2.5*raggio
-(quantos
-32)*3+30;
463 if ((arg
<0*6.28)||(arg
>4*6.28)) value
=0; else
464 value
=.035*sin(arg
)*sin(arg
)*exp(arg
/7);
465 a_points
[a_xx
][a_yy
][2]+=value
;
470 if (a_time
>34.0f
) quantos
=2.0+(a_time
-34.0)/1.5f
;
473 glMaterialfv(GL_FRONT
,GL_DIFFUSE
,a_diffuse
);
474 glMaterialfv(GL_FRONT
,GL_AMBIENT
,a_ambient
);
475 glMaterialfv(GL_FRONT
,GL_SPECULAR
,a_specular
);
476 glMaterialf(GL_FRONT
,GL_SHININESS
,10.0f
);
478 //glDisable(GL_LIGHTING);
483 glTranslatef(-12.8,12.8,0);
488 for (int cc
=0; cc
<1; cc
++)
501 for( a_x
= 0; a_x
< size
-1; a_x
++ )
505 for( a_y
= 0; a_y
< size
-1; a_y
++ )
507 glTexCoord2f(newcoord
[a_x
][a_y
][0],newcoord
[a_x
][a_y
][1]);
508 //glNormal3f(-norm[a_x][a_y][0],-norm[a_x][a_y][1],-norm[a_x][a_y][2]);
509 glVertex3f( a_points
[a_x
][a_y
][0], a_points
[a_x
][a_y
][1], a_points
[a_x
][a_y
][2]);
511 glTexCoord2f(newcoord
[a_x
][a_y
+1][0],newcoord
[a_x
][a_y
+1][1]);
512 //glNormal3f(-norm[a_x][a_y+1][0],-norm[a_x][a_y+1][1],-norm[a_x][a_y+1][2]);
513 glVertex3f( a_points
[a_x
][a_y
+1][0], a_points
[a_x
][a_y
+1][1], a_points
[a_x
][a_y
+1][2]);
515 glTexCoord2f(newcoord
[a_x
+1][a_y
+1][0],newcoord
[a_x
+1][a_y
+1][1]);
516 //glNormal3f(-norm[a_x+1][a_y+1][0],-norm[a_x+1][a_y+1][1],-norm[a_x+1][a_y+1][2]);
517 glVertex3f( a_points
[a_x
+1][a_y
+1][0], a_points
[a_x
+1][a_y
+1][1], a_points
[a_x
+1][a_y
+1][2]);
519 glTexCoord2f(newcoord
[a_x
+1][a_y
][0],newcoord
[a_x
+1][a_y
][1]);
520 //glNormal3f(-norm[a_x+1][a_y][0],-norm[a_x+1][a_y][1],-norm[a_x+1][a_y][2]);
521 glVertex3f( a_points
[a_x
+1][a_y
][0], a_points
[a_x
+1][a_y
][1], a_points
[a_x
+1][a_y
][2]);
526 for(a_y
=size
-2;a_y
>=0;a_y
--)
528 glTexCoord2f(newcoord
[a_x
][a_y
][0],newcoord
[a_x
][a_y
][1]);
529 glVertex3f( a_points
[a_x
][a_y
][0], a_points
[a_x
][a_y
][1], a_points
[a_x
][a_y
][2]);
531 glTexCoord2f(newcoord
[a_x
][a_y
+1][0],newcoord
[a_x
][a_y
+1][1]);
532 glVertex3f( a_points
[a_x
][a_y
+1][0], a_points
[a_x
][a_y
+1][1], a_points
[a_x
][a_y
+1][2]);
534 glTexCoord2f(newcoord
[a_x
+1][a_y
+1][0],newcoord
[a_x
+1][a_y
+1][1]);
535 glVertex3f( a_points
[a_x
+1][a_y
+1][0], a_points
[a_x
+1][a_y
+1][1], a_points
[a_x
+1][a_y
+1][2]);
537 glTexCoord2f(newcoord
[a_x
+1][a_y
][0],newcoord
[a_x
+1][a_y
][1]);
538 glVertex3f( a_points
[a_x
+1][a_y
][0], a_points
[a_x
+1][a_y
][1], a_points
[a_x
+1][a_y
][2]);
545 glDisable(GL_DEPTH_TEST
);
547 glDisable(GL_LIGHTING
);
549 a_counter
=a_time
*10.0f
;
551 for (int p
=0; p
<a_num
; p
++)
554 time
=a_time
*500-2.0-parts
[p
].time
;//********************************************************
556 glTranslatef(parts
[p
].a_x
,parts
[p
].a_y
,parts
[p
].z
);
557 glRotatef(-a_zrot
,0,0,1);
558 glRotatef(90-2.0f
*a_xrot
,1,0,0);
559 glRotatef(parts
[p
].angle
-135,0,0,1);
560 glTranslatef(parts
[p
].a_mod
,0,0);
562 if (a_time
<20.0f
) glColor4ub(parts
[p
].r
,parts
[p
].g
,parts
[p
].b
,(unsigned char)((parts
[p
].a
-(int)((GLfloat
)time
/8.0f
))*(a_time
-6.0)/14.0));
563 else glColor4ub(parts
[p
].r
,parts
[p
].g
,parts
[p
].b
,(unsigned char)(parts
[p
].a
-(int)((GLfloat
)time
/8.0f
)));
565 if (a_time
>6.0) a_drawquad(1.125f
-.75*p
/a_num
);
566 parts
[p
].a_mod
=parts
[p
].speed
*time
/35.0f
;
567 parts
[p
].speed
=parts
[p
].speedlim
-time
/2500000.0f
;
568 if (parts
[p
].speed
<0.005f
) parts
[p
].speed
=0.005f
;
569 if (parts
[p
].a
-(int)((GLfloat
)time
/8.0f
)<3)
572 parts
[p
].a_x
=10.0f
*sin(a_counter
*4.0f
*3.14f
/360.0f
);
573 parts
[p
].a_y
=0.0f
+10.0f
*sin(a_counter
*2*3.14/360.0);
574 parts
[p
].z
=a_Sinus
[2]=3.0f
-2.5f
*cos(a_counter
*8.0f
*3.14f
/360.0f
);
575 parts
[p
].r
=128+rand()%128;
576 parts
[p
].g
=128+rand()%128;
577 parts
[p
].b
=128+rand()%128;
578 parts
[p
].a
=rand()%255;
580 parts
[p
].speedlim
=.005+.0001*((GLfloat
)(rand()%1000));
581 parts
[p
].speed
=parts
[p
].speedlim
;
582 parts
[p
].time
=(int)(a_time
*500-2);//*********************************
588 a_Sinus
[0]=10.0f
*sin(a_counter
*4.0f
*3.14f
/360.0f
);
589 a_Sinus
[1]=0.0f
+10.0f
*sin(a_counter
*2*3.14/360.0);
590 a_Sinus
[2]=3.0f
-2.5f
*cos(a_counter
*8.0f
*3.14f
/360.0f
);
591 glTranslatef(a_Sinus
[0],a_Sinus
[1],a_Sinus
[2]);
593 glRotatef(-a_zrot
,0,0,1);
594 glRotatef(90-2*a_xrot
,1,0,0);
595 glColor4ub(255,128,255,255);
596 glColor4ub(128,192,255,255);
597 glRotatef(2*a_counter
,0,0,1);
599 a_LightPosition
[0]=0;//a_Sinus[0];//10.0f*sin(a_counter*4.0f*3.14f/360.0f);
600 a_LightPosition
[1]=0;//a_Sinus[1];//0.0f+10.0f*sin(a_counter*2*3.14/360.0);
601 a_LightPosition
[2]=0;//a_Sinus[2];//3.0f-2.5f*cos(a_counter*8.0f*3.14f/360.0f);
602 glEnable(GL_LIGHTING
);
603 glLightfv(GL_LIGHT1
,GL_POSITION
,a_LightPosition
);
604 glDisable(GL_LIGHTING
);
606 a_drawquad(1.0f
+sin(a_counter
*12.0f
*3.1415f
/360.0)+3.1415f
/2.0f
);
608 a_drawquad(3.0f
+2*sin(a_counter
*6.0f
*3.1415f
/360.0));
612 a_LightPosition[0]=10.0f*sin(a_counter*4.0f*3.14f/360.0f);
613 a_LightPosition[1]=0.0f+10.0f*sin(a_counter*2*3.14/360.0);
614 a_LightPosition[2]=3.0f-2.5f*cos(a_counter*8.0f*3.14f/360.0f);
615 // glTranslatef(a_LightPosition[0],a_LightPosition[1],a_LightPosition[2]);
616 glEnable(GL_LIGHTING);
617 glLightfv(GL_LIGHT1,GL_POSITION,a_LightPosition);
620 // a_time=2.0f+(1)/500.0f;//************************************
625 //****************************** FINISH