Commit 10e72ea4 authored by Adam P. Goucher's avatar Adam P. Goucher
Browse files

Include Pavgran recipe

parent a838ae4d
......@@ -107,3 +107,7 @@ Aidan Pierce and Paul Tooke, respectively. Dave Greene helpfully compiled the
[4]: http://conwaylife.com/wiki/2-engine_Cordership
[5]: http://conwaylife.com/wiki/3-engine_Cordership
Pavgran provided a recipe for a 0-degree push based on a c/4 diagonal
wickstretcher, which is the preferred mechanism for ultra-long-distance
pushes (beating the 2-engine Cordership for distances in excess of 118000
full diagonals).
This diff is collapsed.
......@@ -158,13 +158,15 @@ namespace apg {
struct elbowlab {
std::string corderpush2;
std::string crabpush;
std::string snarkmaker;
std::vector<scstream> emitters;
std::vector<scstream> movers;
std::map<std::pair<char, int64_t>, scstream> emmap;
std::map<int64_t, std::vector<scstream> > zerodeg;
void loadpush(std::string filename) {
std::string loadpush(std::string filename) {
std::string corderpush;
std::ifstream ins(filename);
......@@ -172,7 +174,7 @@ namespace apg {
while (std::getline(ins, item, '\n')) {
corderpush += " " + item;
}
corderpush2 = corderpush;
return corderpush;
}
void loadsm(std::string filename) {
......@@ -237,7 +239,25 @@ namespace apg {
scstream approximate(int64_t rel) {
if ((rel > 4000) && (corderpush2.length() > 0)) {
if ((rel > 236000) && (crabpush.length() > 0)) {
scstream scs2(crabpush);
for (uint64_t i = 0; i < scs2.gstream.size(); i++) {
if (scs2.gstream[i] == 1029) {
scs2.gstream[i] += (((rel - 65536) / 24) * 12);
}
}
scs2.endblocks[0] += ((rel - 65536) / 24) * 12;
scstream scs3 = movers[1];
for (uint64_t i = 0; i < 8; i++) { scs3.concat(movers[1], 0); }
scs3.concat(scs2, 0);
return scs3;
} else if ((rel > 4000) && (corderpush2.length() > 0)) {
scstream scs2(corderpush2);
......
......@@ -33,7 +33,9 @@ namespace apg {
cg.datadir = "data/";
el.loadrecs("data/simeks/pp.txt");
el.load0deg("data/simeks/pp0deg.txt");
el.loadpush("data/corderpush2.txt");
el.corderpush2 = el.loadpush("data/corderpush2.txt");
el.crabpush = el.loadpush("data/crabpush.txt");
el.loadsm("data/snarkmaker.txt");
std::ifstream ins("data/corderpush.txt");
std::string item;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment