X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=visual%2Fvisual.c;h=38ff0b0e09f321426d26ecc5c648fbf06e63c3c6;hb=45b27e01673a6cc5bebecb49c51d7f587917483e;hp=9d0f5a2ca85b76092d0931292dc2388a1e8e0b31;hpb=83775c491117faa149281d0302fc8b8064d6b080;p=physik%2Fposic.git diff --git a/visual/visual.c b/visual/visual.c index 9d0f5a2..38ff0b0 100644 --- a/visual/visual.c +++ b/visual/visual.c @@ -31,6 +31,8 @@ int visual_init(t_visual *v,char *filebase) { return -1; } + memset(&(v->dim),0,sizeof(t_3dvec)); + return 0; } @@ -45,9 +47,14 @@ int visual_atoms(t_visual *v,double time,t_atom *atom,int n) { int i,fd; char file[128+64]; + t_3dvec dim; + + dim.x=10e9*v->dim.x; + dim.y=10e9*v->dim.y; + dim.z=10e9*v->dim.z; char pse[19][4]={ - "foo", + "*", "H", "He", "Li", @@ -77,9 +84,9 @@ int visual_atoms(t_visual *v,double time,t_atom *atom,int n) { /* script file update */ dprintf(v->fd,"load xyz %s\n",file); - dprintf(v->fd,"spacefill 200\n"); - //dprintf(v->fd,"rotate x 100\n"); - //dprintf(v->fd,"rotate y 10\n"); + dprintf(v->fd,"spacefill 300\n"); + dprintf(v->fd,"rotate x 100\n"); + dprintf(v->fd,"rotate y 10\n"); dprintf(v->fd,"set ambient 20\n"); dprintf(v->fd,"set specular on\n"); sprintf(file,"%s-%.15f.ppm",v->fb,time); @@ -87,11 +94,23 @@ int visual_atoms(t_visual *v,double time,t_atom *atom,int n) { dprintf(v->fd,"zap\n"); /* write the actual data file */ - dprintf(fd,"%d\n",n); + dprintf(fd,"%d\n",(dim.x==0)?n:n+8); dprintf(fd,"atoms at time %.15f\n",time); for(i=0;i