-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Make rotations/angles consistent #275
Conversation
Thanks for the fixes! @johannes-wolf can this be merged into @matthew-e-brown Do you mind adding fixes to make sure all the rotation stuff goes in the same direction? like |
Yes, this can go into |
Sure 🙂 I will take a look at the other styles of rotation as soon as I finish up the homework that this distracted me from 😆 Hopefully later tonight or tomorrow morning. |
@johannes-wolf Since my branch is based off of your |
vector.angle2
rotations
Thanks and good luck!
No as we'll squash commit so the arc-through commit would get lost. Either #273 gets merged first or this pr rebases onto the current head of redesign-internals. |
@matthew-e-brown, your example picture looks very nice btw. 👍 |
Can this get merged @matthew-e-brown? |
Hi @johannes-wolf sorry for disappearing. I said I'd finish up my schoolwork and then get to this PR, but my university had other plans. I've been beyond busy for the last few weeks. 🫠🪦 If I recall correctly I still had yet to look into the rotation matrices before un-drafting it. I believe it was finding a problem with the matrices, even after making my other tweaks, that made me decide to open that big issue—so I think they were definitely on my checklist. Of course I also wanted to do a full scan through and look at all the other places where rotations were used, and make sure nothing was broken and that all their angles were correct. Finally I was hoping to add a test or two if needed. That said, I believe the commits that are already here are totally fine. So this could be merged if you wanted to get it in for the next version, but I'm pretty sure (again, it's been a while) there are a few more tweaks to make. At the very least, there's a few double checks to do. I would love to be the one to finish up this PR because I'd be proud to contribute, but I'd hate for it to hold things up. So if someone else wants to take over this fix to get it across the finish line, I'd be cool with that. If not, I promise I haven't forgotten about it! 😅 I'd love to get back to it eventually. I'll be back into using Typst for another assignment soon, so I may be able to find an hour or two to poke around in CetZ sometime this weekend... but that is still a ways away. Let me know what you'd like to do. Sorry again!! 🍁 |
I'll wait, take your time. :) |
I discovered that the rotation matrix for xyz euler angles was wrong, so I fixed it and also changed the |
Hi @johannes-wolf, I see there's been quite a lot of work done since I last looked into this. Notably, the I feel like it would make sense to rebase this to a more up-to-date starting point, to avoid double-checking and fixing things that have already been reworked (e.g. all the matrices you guys've been working on). Or do you think it still makes sense to merge it into |
Hi @matthew-e-brown, yes, the |
ec7e67b
to
4feddf4
Compare
Ok, I suggest rebasing this onto 0.2.0 and merging it. I think all other rotation problems are fixed, this is the only things missing having rotation be CCW everywhere. |
4feddf4
to
f44cba2
Compare
feb07cc
to
0f10cb6
Compare
Alright, rebased onto Hopefully removing the |
Can you drop the |
Oh, right... Not gonna lie, it totally slipped my mind that I could do that with a rebase 🤣 |
0f10cb6
to
a21ee3b
Compare
@johannes-wolf I can commit new test images if you'd like, but there's a small problem... The rotations being "correct" now (i.e., reversed; always CCW), means that tests that had manually-rotated things have flipped labels now. Mostly, that's the charts: Other things are also flipped, but those're mostly inconsequential: Should I go in an flip the labels' angles in the charts before committing? |
That would be nice, yes :) |
Alright, ran the script. I checked the images that differed, and they all seem to be free of major visual changes. Only thing is that running it on Typst v0.9.0 means that some of the |
Ah, whoops... I updated Typst to 0.9.0 on my laptop and re-generated the images there—but then this morning I fixed the labls on my desktop and re-ran it... which I have not yet updated to 0.9.0. One sec!! |
Re-update tests in 0.9.0
3fc005c
to
92bd17c
Compare
Much better. Now the only tests with changes are the |
Merged :) Thank you! |
See #274 for details—I'm only a little bit sure this is actually a fix.Closes #274.
Here's the MWE I mentioned, demonstrating that angles are still working as intended. The label on the blue line is spun around to demonstrate that its anchors and rotation follow along as they should.
(generated with Typst v0.8 and CetZ at feb07cc)