X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=visual%2Fvisual.c;h=d03903bc9283c8fdefd818b51fe7bc6a2078474f;hb=d9e7f195bbb219ad4c2de0e5f54d023ef9e669fb;hp=29d9469863be3cde84069ef5444341091a37a0ea;hpb=8358faac044f73487d64f5ba46690dd84367e532;p=physik%2Fposic.git diff --git a/visual/visual.c b/visual/visual.c index 29d9469..d03903b 100644 --- a/visual/visual.c +++ b/visual/visual.c @@ -55,8 +55,6 @@ int visual_init(t_visual *v,char *filebase) { } dprintf(v->fd,"set write on\n"); - memset(&(v->dim),0,sizeof(t_3dvec)); - return 0; } @@ -76,11 +74,11 @@ int visual_atoms(t_visual *v,double time,t_atom *atom,int n) { 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; + dim.x=v->dim.x; + dim.y=v->dim.y; + dim.z=v->dim.z; - sprintf(file,"%s-%.15f.xyz",v->fb,time); + sprintf(file,"%s-%07f.xyz",v->fb,time); fd=open(file,O_WRONLY|O_CREAT|O_TRUNC); if(fd<0) { perror("open visual save file fd"); @@ -94,6 +92,8 @@ int visual_atoms(t_visual *v,double time,t_atom *atom,int n) { dprintf(v->fd,"rotate y 10\n"); dprintf(v->fd,"set ambient 20\n"); dprintf(v->fd,"set specular on\n"); + dprintf(v->fd,"set boundbox on\n"); + //dprintf(v->fd,"label\n"); sprintf(file,"%s-%.15f.ppm",v->fb,time); dprintf(v->fd,"write ppm %s\n",file); dprintf(v->fd,"zap\n"); @@ -103,9 +103,9 @@ int visual_atoms(t_visual *v,double time,t_atom *atom,int n) { dprintf(fd,"atoms at time %.15f\n",time); for(i=0;i