Re:Show HN: Rubik's cube variants in different shapes and si...
by newuser6969 on Tuesday October 02, 2018 @02:27AM
(#18119239)
Cool demo! One thing you could do to improve this is use quaternions to handle rotation of the cube. There are some great articles on implementing quaternions out there if you search for them. For example, I noticed when you turn a cube "upside down", the dragging to the left or right (with ctrl pressed) rotates the cube the wrong way. Quaternions are a great way to solve this issue
[ Parent
| on HN ]
Re:Show HN: Rubik's cube variants in different shapes and si...
by aditya_r_m on Sunday October 07, 2018 @05:43AM
(#18159728)
Improved it, thank you!
Note that Quaternions didn't fix the issue by themselves. I had to change the interpretation of cursor movements to use axis-angle rotation based orientation.
The fix could be deployed with or without Quaternions.
Re:Show HN: Rubik's cube variants in different shapes and si...
by aditya_r_m on Tuesday October 02, 2018 @04:51AM
(#18119835)
yes, Quaternions.. thank you! Will do.. :)
I was expecting exactly this answer to the third problem I mentioned in that medium article.
I've been thinking of studying them for some time now.