Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonicalize rotation when testing flattening #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gaurav-arya
Copy link

@gaurav-arya gaurav-arya commented Feb 18, 2025

The corresponding C++ tests for SpectralConformalParameterization.flatten check if there exists a valid rotation between the produced flattening and the reference solution, but it seems like this logic might be missing from the tests here (note that the normalize function in geometry.js centers and rescales the points, but does not canonicalize rotation). This PR ports over the rotation logic from the C++ test.

(The motivation is that my code for https://brickisland.net/ddg-web/assignments/assignment4/index.html would only pass the test with this adjustment. But it's possible that I just missed some instruction that would allow me to pass the original test, e.g. perhaps there is some preferred rotation specified in the assignment spec that I did not notice.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant