title: How to transform a cube mesh into a diamond shape
body: <p>Is there a way in three.js to turn a cube mesh shape into a diamond shape doing something like rotating the axis of the scale and then scaling it? I'm trying to create a flat-ish diamond shape, something like x50,y50,x10. If not, then what's the best way to create a diamond mesh, or a triangle mesh shape?</p>
  
  <p>If you just turn the cube on its end and scale x you'll still have a (now imbalanced) rectangle shape, but if you turn it on it's end, reorient the axis of scale somehow so it's stretching across the middle from point to point, now you could just squeeze the cube with scale x, and you'd have a nice diamond shape with a thin waist.</p>
  
  <p>For clarification, here's a pic of the mesh shape I am trying to make, ideally the diamond shape on the left, but the triangle shape will do also.</p>
  
  <p><img src="https://i.imgur.com/THGm6tI.jpg" alt="Here&#39;s a pic of the shape I am trying to make"></p>
  
  <p>So, is there some way to rotate the axis of the scale? Is that what <code>new THREE.Matrix4().makeTranslation</code> is for? How do I use that in this context?</p>
  
  <p><a href="http://plnkr.co/edit/Lz8X3LZ8mSlcXTG1Mf5p?p=preview" rel="nofollow noreferrer">See plunker of my attempt here</a>. Clearly my <code>cube.scale.x = 0.5;</code> code is <em>not</em> working and needs the axis of transform to be shifted. </p>
  
  <p>Here's the js: </p>
  
  <pre><code>cube = new THREE.Mesh( geometry, material );
                  cube.rotation.z = Math.PI / 4 ;
                  cube.position.y = 35;
                  cube.scale.x = 0.5;
                  scene.add( cube );
  </code></pre>