printf("-x <value> \t # x cells (default %d)\n",X);
printf("-y <value> \t # x cells (default %d)\n",Y);
printf("-z <value> \t # x cells (default %d)\n",Z);
+ /*
printf("-X <value> \t display x (default %d)\n",X/2-1);
printf("-Y <value> \t display y (default %d)\n",Y/2-1);
printf("-Z <value> \t display z (default %d)\n",Z/2-1);
+ */
printf("-s <value> \t steps (default %d)\n",STEPS);
printf("-d <value> \t refresh display (default %d)\n",REFRESH);
printf("-r <value> \t amorphous influence range (default %d)\n",RANGE);
}
}
}
- p*=*conc;
+ // p*=*conc;
+ // printf("debug: p * conc = %f\n",p);
if(!(*thiz&AMORPH))
{
if(get_rand(URAND_MAX)<=p)
{
MAKE_AMORPH(thiz);
+ printf("debug: c->a %d - %d\n",*t_c,*conc);
*t_c=*t_c+1-*conc;
} else *t_c+=1;
} else
if(get_rand(URAND_MAX)>p)
{
MAKE_CRYST(thiz);
+ printf("debug: a->c %d - %d\n",*t_c,*conc);
*t_c=*t_c+1+*conc;
} else *t_c+=1;
}
}
}
temp=(int)((i+1)*a+b)*t_c/(sum*area_h[i]);
- if(temp)
- {
+ // if(temp)
+ // {
for(j=0;j<area;j++)
{
if(!(*(d3_l->status+(i*area)+j)&AMORPH))
total+=temp;
}
}
- }
+ // }
left=(int)(((i+1)*a+b)*t_c/sum)%area_h[i];
while(left)
{
x=get_rand(d3_l->max_x);
y=get_rand(d3_l->max_y);
- if(!(*(d3_l->status+(i*area)+j)&AMORPH))
+ if(!(*(d3_l->status+(i*area)+x+y*d3_l->max_x)&AMORPH))
{
*(d3_l->extra+(i*area)+x+y*d3_l->max_x)+=1;
total+=1;
x=get_rand(d3_l->max_x);
y=get_rand(d3_l->max_y);
z=get_rand_lgp(d3_l->max_z,a,b);
- if(!(*(d3_l->status+x+y*d3_l->max_x+z*d3_l->max_x*d3_l->max_y)&AMORPH))
+ if(!(*(d3_l->status+x+y*d3_l->max_x+z*area)&AMORPH))
{
- *(d3_l->extra+x+y*d3_l->max_x+z*d3_l->max_x*d3_l->max_y)+=1;
+ *(d3_l->extra+x+y*d3_l->max_x+z*area)+=1;
left-=1;
}
}
max_x=X;
max_y=Y;
max_z=Z;
- x=X/2-1;
- y=Y/2-1;
- z=Z/2-1;
steps=STEPS;
range=RANGE;
refresh=REFRESH;
case 'z':
max_z=atoi(argv[++i]);
break;
+ /*
case 'X':
x=atoi(argv[++i]);
break;
case 'Z':
z=atoi(argv[++i]);
break;
+ */
case 's':
steps=atoi(argv[++i]);
break;
} else usage();
}
+ x=max_x/2-1;
+ y=max_y/2-1;
+ z=max_z/2-1;
+
if(!strcmp(r_file,"")) rand_init(NULL);
else rand_init(r_file);
arg_v[9]=steps_txt;
arg_v[10]=cc_txt;
d3_lattice_draw(&d3_l,x,y,z,10,arg_v);
- scan_event(&d3_l,&x,&y,&z,&quit,&escape);
+ // scan_event(&d3_l,&x,&y,&z,&quit,&escape);
}
i++;
}