malramsay64 / 2d-packing

0 stars 0 forks source link

Re-implement flips of the shapes #7

Open malramsay64 opened 5 years ago

malramsay64 commented 5 years ago

Flipping the shapes was an element of the finding the best packing, allowing for chiral unit cells. I removed this from the implementation in 7491a7773e554e24bbb01597a1c78837e1be0de2 as the implementation wasn't right and needed significant rethinking. So rather than keep the janky functionality it was removed.

I would like to reimplement the functionality to be at feature parity with the original codebase, however I want to do it in a way that is more reasonable.

malramsay64 commented 5 years ago

Part of the problem of the flips is that they should probably take place at a slower rate than moving the particles or the unit cell. This makes just adding them to the basis list straight up won't particularly work. A workaround for this is to have a test when choosing the basis to modify, should a random number not meet a criteria then try picking another basis.

This would then mean I can add a separate basis for each individual flip which is modified in exactly the same way as any other Basis.