2 KiB
Instructions for running code
Compiling
You need to compile the code before you can run it. You can compile it locally, but to do that you would need to install Rust, which is probably not worth it. I would recommend ssh-ing into the lab computers and using them to compile it. In either case, to compile the code, simply run the command cargo build --release from this directory. If you want to run it locally, or can't ssh into a lab computer, let me know what platform you're on (Windows or Mac) and I'll see if I can compile it for that platform and send the binary to you.
Data
Next you will need to give the code the right data. Inside this directory there is a folder called data which has all the data. For each polyhedron, there is a corresponding file called polyhedron.txt (e.g. tetrahedron.txt) with the corresponding data. First is the Gram matrix in the format Mathematica spits out. Next is the face data. It should correspond with the Gram matrix and be in Mathematica's list format, but it is indexed starting from 0 unlike Mathematica. The file fractal_dimension.nb has some functions that make this convenient. You can simply type up the gram matrix, then run FindFace[graphFromG[G]]-1 and that will spit out exactly what you want. Then put this somewhere in the data folder where it makes sense.
Actually running
I wrote a little script called driver.sh that runs this code on everything in the data folder that isn't already computed and stores the result in a folder called output. You should just be able to run ./driver.sh <max_curvature> (I'd recommend ./driver.sh 1e3 to see if it works, then ./driver.sh 1e6 and/or ./driver.sh 1e7). If you want to run it manually, you can run ./target/release/circle_counting dimension --help and it will tell you what the options and their defaults are. Likewise, if you want to generate a picture, you can run ./target/release/circle_counting picture --help and it will tell you how to run that. You can also tweak the options in driver.sh, but that can have some unexpected effects.