| Author |
Comment/Response |
Daniel Wieder
|
09/26/12 10:05am
Greetings, I am currently working on a C# project for which I need a file with a list of one sided polyominos. I found a Wolfram Mathmatica program (Source attached) which does almost what I need but I don't know enough about the language to modify it. I don't think that it will take too long to modify and I'm hoping that somebody would be willing to do so and post a link to the modified source code or the output file.
Currently the program outputs a list of the polyminoes to the screen. I need it to output the list to a file so that I can quickly access them. I also need it to output all one sided polyominos with 9 squares or less. If it takes too long to generate the 9 squared ones I can use the 8 squared ones instead.
The save format can be pretty much anything. Ideally I'd like a binary file with data storage like I've listed below in pseudocode.
int maxSize = 10;
for(int n = 0; n < maxSize; n++)
{
write int quantityOfSizeNPolyominoes
List<bit[][]> polyominos
write int n
int gridSize = n - n % 2 + 1;
for(int x = 0; x < quantityOfSizeNPolyominoes; x++)
for(int y = 0; y < gridSize; x++)
for(int z = 0; z< gridSize; z++)
write bit polyominos[x][y][ z];
}
Thank you for any help that you can provide.
Attachment: OneSidedPolyominoes-source.nb, URL: , |
|