title: How System.Windows.Media.Media3D.Matrix3D work
body: <p>It seems straight forward to define a function like this</p>
  
  <pre><code>/// &lt;summary&gt;
  /// Build 3D transform matrix with image of unit vectors of axes, and the image of the origin
  /// &lt;/summary&gt;
  /// &lt;param name="xUnit"&gt;The image of x axis unit vector&lt;/param&gt;
  /// &lt;param name="yUnit"&gt;The image of y axis unit vector&lt;/param&gt;
  /// &lt;param name="zUnit"&gt;The image of z axis unit vector&lt;/param&gt;
  /// &lt;param name="offset"&gt;The image of the origin&lt;/param&gt;
  /// &lt;returns&gt;The matrix&lt;/returns&gt;
  public static Matrix3D MatrixFromVectors(Vector3D xUnit, Vector3D yUnit, Vector3D zUnit, Vector3D offset)
  {
      var m = new Matrix3D(
          xUnit.X, xUnit.Y, xUnit.Z, 0.0, 
          yUnit.X, yUnit.Y, yUnit.Z, 0.0, 
          zUnit.X, zUnit.Y, zUnit.Z, 0.0, 
          0, 0, 0, 1);
      m.Translate(offset);
      return m;
  }
  </code></pre>
  
  <p>However the test code</p>
  
  <pre><code>...
  var m = Geo.MatrixFromVectors(vx,vy,vz,new Vector3D(1,2,3));
  var result = m.transform(new Vector3D(1,0,0)) //result: equal to vx
  ...
  </code></pre>
  
  <p>shows it does not use the offset at all. How to make it work?</p>