#include "../moldyn.h"
#include "../math/math.h"
+/* the pse, only needed here */
+static char *pse[]={
+ "*",
+ "H",
+ "He",
+ "Li",
+ "Be",
+ "B",
+ "C",
+ "N",
+ "O",
+ "F",
+ "Ne",
+ "Na",
+ "Mg",
+ "Al",
+ "Si",
+ "P",
+ "S",
+ "Cl",
+ "Ar",
+};
+
int visual_init(t_visual *v,char *filebase) {
char file[128+8];
perror("open visual fd");
return -1;
}
+ dprintf(v->fd,"set write on\n");
memset(&(v->dim),0,sizeof(t_3dvec));
int visual_tini(t_visual *v) {
- if(v->fd) close(v->fd);
+ if(v->fd) {
+ dprintf(v->fd,"quit\n");
+ close(v->fd);
+ }
return 0;
}
dim.y=10e9*v->dim.y;
dim.z=10e9*v->dim.z;
- char pse[19][4]={
- "*",
- "H",
- "He",
- "Li",
- "Be",
- "B",
- "C",
- "N",
- "O",
- "F",
- "Ne",
- "Na",
- "Mg",
- "Al",
- "Si",
- "P",
- "S",
- "Cl",
- "Ar",
- };
-
sprintf(file,"%s-%.15f.xyz",v->fb,time);
fd=open(file,O_WRONLY|O_CREAT|O_TRUNC);
if(fd<0) {
/* script file update */
dprintf(v->fd,"load xyz %s\n",file);
- dprintf(v->fd,"spacefill 300\n");
+ dprintf(v->fd,"spacefill 270\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");
+ 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");