This forum is a great place to get help on specific questions related to MATLAB but it sounds like you're looking for help to get started on your project. Feel free to edit your question with a specific MATLAB question.
Cleve's Corner blog has several recent articles on graphically creating rubiks cubes but does not get into the topic you're describing.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.