From: Torquil M. <to...@gm...> - 2008-01-17 20:40:22
|
Hello, I have a C++ program that simulates the movements of polygons. It runs a=20 plotting function e.g. every 100 iterations of the simulation. Why is it th= at=20 when I use PLPLOT there is lots of flickering, but with PGPLOT it looks gre= at=20 without any flickering? Is PGPLOT much faster than PLPLOT or am I doing=20 something wrong? With plplot it is too much flickering to be able to watch= =20 the polygons move around. I have tried setting the xwin device options=20 nobuffering and sync, but there was no difference. Here is a description of the code: void new_page() { plclear(); plbox("bcinst", 0, 0, "bcinst", 0, 0); } void plot() { new_page(); {..calculate plot quantitie here...} {... some plline() functions...} } =09 int main() { plsdev("xwin"); plinit(); plenv(xmin, xmax, ymin, ymax, 1, -2); for(int i =3D 0; i !=3D i_max; ++i) { {...simulation_code here...} if(i % 100 =3D=3D 0) plot(); } plend(); return(0); } Best regards, Torquil S=F8rensen |