Final Project for APCS, Fall 2014
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


By Peter Strbik and Brandon Lin

Our project is VirtCube, a virtual Rubik's Cube simulator.


  • Controls allow you to maneuver the cube's 6 faces and rotate it along its 3 axes
  • 4 different modes to choose from:
  • Solved cube so you can experiment with the cube
  • Easy scramble for those just getting started
  • Hard scramble for those with experience
  • Mr. K's scramble for Mr. Konstantinovich himself :)
  • Timer to see how fast your solves are.
  • Two different control styles:
  • Nub control style for beginners
  • Real Man's control style for those experienced with virtual cubes

Update Log


  • Used the SpaceJunk Example to generate a colored cubex


  • Implemented (slightly) turning of two cubelets about an axis upon a key press. rotateZ is still glitched, however.
  • Full Rubik's Cube created with black border.


  • Fixed annoying flickering issue on the cube.


  • U-Turn attempted to implement.
  • The cube is now made to draw initially only once.


  • Fixed issue of cube not being centered on axes. (U-turn still not working properly. Still some bugs in cube rotations.)
  • A PVector was used instead of shiftX.


  • Created an array for the cube's colors to check if the cube is solved.
  • Bug fixed that made animation not appear; but doesn't run now with while loop.


  • Converted vertices to arrays of floats.
  • Implementing a 3D array instead.
  • New structure now works when rotating 1 degree at a time.


  • A right face turn was implemented.
  • Center realigned to actual center; simultaneous turns and multiple turns taken care of.


  • Created a function that will swap the cubies correspondingly.
  • All turns implemented, X rotation working.
  • Black outline for cube working.
  • All cube turns and cube rotations are now fully functional.
  • Fixed a bug in which the nonvisible parts of the parts were also showing colors. 2015-01-15
  • Function created to generate a random move sequence. The actual graphical scrambling is bugged, however.


  • Scramble generator fixed, fully works now.
  • Implemented start screen with buttons for different scramble types.
  • Control instructions added.


  • Return to menu button created.
  • The 12 cube turns now change the colors array that will check for a solved position.
  • Function to check for solved state added.


  • The program can now check if the cube is solved or not based up the moves done.


  • A congratulations message appears when the cube is solved.
  • Stopwatch added for timing solves.
  • Easter egg added.


  • Added nub controls and Real Man's Controls.
  • Added button highlighting when the cursor is over it.