title: Rubik's cube (Rotation and tracking)
body: <p>I'm a newbie in c++ and openGL so keep in mind that my coding skills are not top notch but I'm a quick learner.</p>
  
  <p>So,because my favorite puzzle is the Rubik's Cube,I decided to unleash my creativity so now I'm currently making a 3D Rubik's Cube and I'm representing each cubie piece(26 pieces excluding the core piece) individually using quads.(planning to use textures in the future after I learn how to use them)</p>
  
  <p>Right now I'm able to rotate the camera around using glRotatef and see the whole cube.</p>
  
  <p>The main problem I have stumbled upon is rotating each face by its own and also keeping track of the cubies to determine which faces they now belong to which will also determine if they will be affected if the face rotated.</p>
  
  <p>At this point I have realized that using glRotatef will bring no good in moving forward so I searched around and found out about <strong>Quaternions</strong> so I have read a bunch of tutorials about them but I have no idea how to implement them and use them.</p>
  
  <p>This is the last tutorial I have been reading:</p>
  
  <p><a href="http://www.cprogramming.com/tutorial/3d/quaternions.html" rel="nofollow">http://www.cprogramming.com/tutorial/3d/quaternions.html</a></p>
  
  <p>My request would be a very simple example on how to implement it and use it in my display function.</p>
  
  <p>As for keeping track of the cubies,I'm currently thinking of using 6 booleans for each piece to determine their position through the center pieces.</p>
  
  <p>If you have any other better ideas or concepts on managing face rotations please do tell.</p>
  
  <p>Regards,,</p>