Search Wiki:
This application creates an interactive, 3D model of a Rubik’s cube. It contains 26 small 3D squares which combine to form a Rubik’s cube. Colors are assigned to each side of the cube. If you look at a real Rubik’s cube, you will find every sub-cube has a gray surface with a smaller round rectangle painted on it. I wanted to produce same effect on our example.

We have to place every sub-cube in 3D space and I have named the cubes according to its starting position using the following pattern CUBEX0Y0Z0. This name tells us that the cube's unit left location is X0, the unit bottom location is at Y0 and it is Z0 units away from origin.

Because we wanted to keep the rotation in memory, we also keep the rotation transformation for each cube. Last we also want to save all information in 3 separate arrays, so we could rotate each axis. After rotating any axis we update the rest of the cubes in the array. Code is provided for rotating the cubes in both a clockwise and counter-clockwise direction.

If you have any further question, please email me.

This page is dedicated to games created by Agha Kahn.

Creating Rubik’s cube with WPF

It is small application to mimic Rubik’s cube.
It contains following file
Last edited Mar 4 2008 at 9:29 PM  by CharlieCalvert, version 6
Jim wrote  Mar 6 2008 at 2:29 AM  
Awesome! We need more games like this! Nice Job!!

Sam wrote  Mar 6 2008 at 10:55 PM  
How refreshing !!!!, to see 3-D games like this one can be created with that speed in C#. It is an outstanding game undoubtly.

Hugh wrote  Mar 7 2008 at 10:27 PM  
Great Job! I love samples like this. I just want to jump right into this new technology.

harisharekar4 wrote  Apr 3 2010 at 11:25 AM  
hey guys how to run dis code.. plzz help me.. ? m new to dis... thnks in advance... :)

woven wrote  Aug 10 2010 at 2:10 PM  
Very nice.

Page view tracker