10
2
Fork 0

attitude adjustment: explain solvepath better, make resources subheading

This commit is contained in:
Erin Moon 2020-05-25 21:25:44 -05:00
parent ad630a9428
commit da982ca3a1
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@
## Writeup
by [erin (`barzamin`)](https://imer.in).
For this problem, we have two sets of N vectors which are paired; all points in the first set are just those in the second set up to rotation. Since we already know which point in the observation set maps to which vector in the catalog set, we can use the [Kabsch algorithm](https://en.wikipedia.org/wiki/Kabsch_algorithm) to find the rotation matrix (note that this is called an *orthogonal Procrustes problem*).
For this problem, we have two sets of N vectors which are paired; all points in the first set are just those in the second set up to rotation; we want to find the rotation which maps the first set onto the other one. Since we already know which point in the observation set maps to which vector in the catalog set, we can use the [Kabsch algorithm](https://en.wikipedia.org/wiki/Kabsch_algorithm) to find the rotation matrix (note that this is called an *orthogonal Procrustes problem*). I'd only vaguely heard of the Kabsch algorithm before, and in the context of bioinformatics, so I didn't immediately identify it as a good path to the solution. Instead, I just googled "_align two sets of vectors_", for which it's the third result.
Since nobody has time to implement computational geometry during a ctf, I grabbed an existing Kabsch implementation. For some reason, I didn't notice that `scipy.spatial` has [a Kabsch implementation](https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.transform.Rotation.align_vectors.html) built in, so I used some random external project, [`rmsd`](https://github.com/charnley/rmsd).
@ -71,7 +71,7 @@ The flag should get printed out on stdout by the final line.
```{.python include=attitude.py}
```
### Resources and other writeups
## Resources and other writeups
- https://en.wikipedia.org/wiki/Orthogonal_Procrustes_problem
- https://en.wikipedia.org/wiki/Kabsch_algorithm
- https://github.com/charnley/rmsd/tree/master