![projects](images/title-projects.gif)
Rubiks Cube Solver
In the Spring of 2006 I wrote a Rubiks Cube Solver for CS302 (Discrete Math II). You might be wondering: "what does a Rubik's Cube have to do with discrete
math?". Well, my partner and I kinda took the semester project and ran our own direction with it. I thought it would be cool to learn OpenGL and C#, and
she was dying to implement a Rubik's Cube solving algorithm.
Little did I know, OpenGL is not exactly something you can pick up in a weekend (or perhaps I should say, I could not pick it up in a weekend). Everything was going fine until I tried accumulating rotations of the different faces of the cube. After multiple discussions with one of the graphics professors in the department on the topic of gimbal lock and quaternions I decided I needed to avoid this rotation issue altogether. In the end I simply faked the rotations by changing the position of the blocks instantly in the last frame of rotation while simultaneously changing the color of the affected faces. The result is a smooth rotation, but in the background, it's a total hack job.
You can grab a copy to play with here and the source is here. Note that the C# GL library doesn't seem to like Windows Vista.