static Parameter<int> tn("tn", "Number of sections around `strip'", 30, 1, 1, 500);
static Parameter<int> un("un", "Number of sections across `strip'", 15, 1, 1, 500);
-static Parameter<int> orig("orig", "Use original strip (not reformulated)", 1, 0, 0, 1);
+static Parameter<int> version("version",
+ "Version to use: 0=original strip, 1=reformulated,"
+ " 2=reformulated again", 0, 1, 0, 2);
static Parameter<double> theta("theta", "Angle of model rotation",
/*-PI/2.*/0, M_PI/8., -M_PI*2., M_PI*2.);
static Parameter<double> eta("eta", "Angle of model elevation",
void generate() {
if (list) delete list;
Moebius *strip;
- if (orig) {
- strip= new MoebiusStrip(width);
- } else {
- strip= new MoebiusEnfoldment(thickness,bottomportion);
+ switch (version) {
+ case 0: strip= new MoebiusStrip(width); break;
+ case 1: strip= new MoebiusEnfoldment(thickness,bottomportion); break;
+ case 2: strip= new MoebiusEnfoldmentNew(); break;
+ default: abort();
}
list= new SortedCellList;
double t0= 0.0;
if (x11) list->display(*x11);
if (dualx11) list->display(*dualx11);
for (;;) {
- cin.get(buf,100,'\n');
- char c;
- if (!cin.get(c) || c!='\n') {
- cerr << "error reading command input, giving up\n";
+ cin.getline(buf,sizeof(buf),'\n');
+ if (!cin.good()) {
+ cerr << "error reading command input, giving up\n";
exit(1);
}
char *equals= strchr(buf,'=');