Original Post
i have model a cloud..
the problem is, how to animate it..
i don''t really understand about the partical system...
which formula should i used to animate the cloud?
below is my cloud model source code ::
#include <glut.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#define TITIK 2000
typedef GLfloat point3D[3];
typedef point3D gas[TITIK];
gas dot;
void Populate(gas anal)
{
int i=0;
GLfloat randx, randy;
{
while(i (randx * randx + randy * randy) )
{
anal[0] = randx;
anal[i][1] = randy;
anal[i][2] = 0;
i++;
}
}
}
}
void MyInit()
{
Populate(dot);
}
int Update()
{
}
void Display(void)
{
int i;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(100.0, 200.0, 100.0, // eye point
1.0, 0.0, 0.0, // center of view
5.0, 0.0, 1.3); // up
glPushMatrix();
glScalef(10.0,10.0,10.0);
glColor3f(1.0, 1.0, 1.0);
glBegin(GL_QUADS);
for (i=0; i