Rubik's Cube Simulator
Scramble and solve Rubik's cubes!
Controls:
- General
q
- quitw
- toggle wireframe modes
- toggle "scenegraph" viewa
- scramble cubez
- reset cube
- Turning faces
d
- turn near left face (L)f
- turn near right face (F)r
- turn top face (U)e
- turn back left face (B)t
- turn back right face (R)c
- turn bottom face (D)SHIFT + *
- turn * face in reverse (')
- Rotating cube
i
- turn L face upn
- turn L face downu
- turn F face upm
- turn F face downh
- turn cube leftk
- turn cube right
Build Instructions
Requires SDL2 to be installed.
Run python build.py
or make
(which runs build.py
for you)
Overview
This was my final project for my Computer Graphics course at Northeastern University. I used OpenGL and SDL to develop an application that allows the user to scramble and solve Rubik's cubes shown on screen.
The key to this project was the Dynamic Scene Graph that I developed. It allowed me to rotate all the cubies on a single face with a single rotation, then rewrite the scene graph so that some of the same cubies could then rotate around a different axis with the rest of that face. See the video below for visuals and more details.
The majority of the code for the project was written over the course of the semester for various labs and assignments, then compiled together and tweaked for this project.