How to write a function to generate all non isomorphic ways of arranging 9 x's on a 9 square board

44 Views Asked by At

How do I systematically generate the 102 nonisomorphic arrangements of x's onto a 9 square board using asymptote?

These such arrangements are shown on the last page here https://arxiv.org/pdf/1301.1672v1.pdf.

Here is the code I have thus far.

import animate;
pair A=(10,30);
pair B=(30,30);
pair C=(50,30);
pair D=(10,10);
pair E=(30,10);
pair F=(50,10);
pair G=(10,-10);
pair H=(30,-10);
pair I=(50,-10);
draw((0,20)--(60,20));
draw((0,0)--(60,0));
draw((20,40)--(20,-20));
draw((40,40)--(40,-20));

void cross(pair x) {
  draw(x-(6,6)--x+(6,6), linewidth(2));
  draw(x-(6,-6)--x+(6,-6), linewidth(2));
}  

cross(A);

cross(B);

cross(C);

How do I create a function that can draw the crosses accordingly?

0

There are 0 best solutions below