You could take the flag to be two parallel sine waves which shift their phase a little bit in each frame.

```
for(phase=0;phase<360;phase++) {
for(theta=0;theta<360;theta++) {
x=(theta+phase)*PI/180;
y1=sin(x);
y2=sin(x)+y_trans;
plot pixel at x,y1 and x,y2
}
clear screen
}
```

This may not be too exact but I hope you got the idea. There surely must be better ways to do this also.

Hi everybody,

plz i want a openGL code to make a flag seems fly(flap)

plz its very important…