3 ms·
I'm trying to figure out what you're trying to say here. You didn't really define what "cube coordinates" or "piece coordinates" are. If you're trying to redu
by spartanatreyu 9mo ago
I'm trying to figure out what you're trying to say here.
You didn't really define what "cube coordinates" or "piece coordinates" are.
If you're trying to reduce the size of the state needed to represent the entire state of the cube, you can represent it as the operations needed to transform a solved cube into that state.
Each possible permutation of legal state in a rubiks cube can be achieved in 20 operations (moves) or less.
But that's expensive to calculate if you are only given the target state without the list of operations to generate that state.
It also doesn't let you represent illegal states (e.g. someone has spun a single corner piece on the spot) or know if a given state is illegal without trying to brute-force solve the cube.
Needing to represent the state of a cube without knowing the operations that generate that state is far more useful than being given a state that's already the solution to solve a cube.
- phkahler 9mo agoBy "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.