3 ms·
By "cube" coordinates i mean a coordinate system centered on the whole cube. By "piece" coordinates i mean with the origin centered on one of the smaller pieces
by phkahler 9mo ago
By "cube" coordinates i mean a coordinate system centered on the whole cube. By "piece" coordinates i mean with the origin centered on one of the smaller pieces of the puzzle.
In graphics programming you'd use world coordinates and object coordinates in a similar way. Each piece is geometrically the same (except color) in object coordinates. To rotate you normally rotate in object coordinates and then move (translate) in world coordinates. Im saying just define each piece in world coordinates and rotate them in world coordinates. They'll orbit the center of the whole cube that way and you'll only be changing their orientation.
Another way to say it might be: use quaternions to describe the orientation of a piece where (1,0,0,0) is the piece in "solved" position. After applying several rotations to a piece you still have orientation in a single quaternion, which can also be applied to the original position vector to find out where it is now. Location and orientation are not independent.
Another way to say it is that if you have any given piece and know its orientation, there is only one place it can be on the puzzle.