X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=visual%2Fvisual.c;h=3a8f7f8e2fcaeaab51f7dc03deeb2c1da88119f0;hb=c1f74e23422d004f7b9d2493cc747871c7ebfbae;hp=d6ce369bb580022d8d979f51ab5e85dccc1c4cbb;hpb=91e4a00285261865ffce4b9553d153b562c80ee6;p=physik%2Fposic.git diff --git a/visual/visual.c b/visual/visual.c index d6ce369..3a8f7f8 100644 --- a/visual/visual.c +++ b/visual/visual.c @@ -78,7 +78,8 @@ int visual_atoms(t_visual *v,double time,t_atom *atom,int n) { dim.y=v->dim.y; dim.z=v->dim.z; - sprintf(file,"%s/visualize_%07.f.xyz",v->fb,time); + //sprintf(file,"%s/visualize_%07.f.xyz",v->fb,time); + sprintf(file,"%s/povray_%07.f.in",v->fb,time); fd=open(file,O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR); if(fd<0) { perror("open visual save file fd"); @@ -87,8 +88,7 @@ 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\n"); - //dprintf(v->fd,"spacefill 100\n"); + dprintf(v->fd,"spacefill 200\n"); dprintf(v->fd,"rotate x 100\n"); dprintf(v->fd,"rotate y 10\n"); dprintf(v->fd,"set ambient 20\n"); @@ -100,23 +100,56 @@ 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",(dim.x==0)?n:n+8); - dprintf(fd,"atoms at time %07.f\n",time); + //dprintf(fd,"%d\n",(dim.x==0)?n:n+8); + dprintf(fd,"# [C] %d\n",n); + dprintf(fd,"# [T] %07.f\n",time); + dprintf(fd,"# [L] <%f,%f,%f>\n",-1.0*dim.x/4.0, + 1.5*dim.y,1.5*dim.z); for(i=0;i