title: Gimbal Lock and Rotationmatrix questions
body: <p>I have got some questions related to rotations on 3D objects. I am using a right-handed system with row-major matrix.</p>
  
  <p>I've been programming a drawer, which draws lines based on the orientation of the current rotation. </p>
  
  <p>My questions:</p>
  
  <p>If I always use a different axis on each rotation, based on the new orientation, can gimbal lock still happen when I only rotate once? For example:</p>
  
  <pre><code>    matrix.rotate(angle,newaxis) // newaxis is based on the current orientation
  </code></pre>
  
  <p>I tested many situations with the rotation matrix. I found out that each column represents a vector of the new coordinate system. Like <code>matrix.column[0]</code> is <code>x-axis</code> and <code>matrix.column[1]</code> is <code>y-axis</code>. My questions is this: I need to get x, y, z values to 'move forward and draw a line. Like this </p>
  
  <p><code>moveX(current.x+d*orientation.x)</code>. </p>
  
  <p>I found out that the solution was to grab the values from the <strong><em>first row</em></strong> of the matrix. <strong>But why is that so?</strong></p>