title: ConvexHull orders differently in matlab and python
body: <p>I have this problem: I need to use in my Python code the <code>ConvexHull</code> function and I need it to work exactly the same way as the <code>ConvHulln</code> in MATLAB, but they give different results. This is an example (I'm using the <code>scipy.spatial.ConvexHull</code> but I've tried with the <code>cv2.convexHull</code> and with the Python <a href="https://pypi.python.org/pypi/pyhull" rel="nofollow"><code>ConvexHull</code></a> too and they don't give the correct result. </p>
  
  <p>The MATLAB command used is: <code>k = convhulln([r, c]);</code> and the Python command used <code>k = ConvexHull(rc,qhull_options='Qt').simplices</code> </p>
  
  <p>The results obtained are different: </p>
  
  <p>MATLAB: </p>
  
  <pre><code>k= 
  [[104 1] [1 8] [8 17] [17 103] [103 125] [125 136] [136 162] [162 166] [166 167] [167 163] [163 104]]
  </code></pre>
  
  <p>Python:</p>
  
  <pre><code>k=[[ 16 102][103   0][  7   0][  7  16][162 166][162 103][124 102][124 135][161 135][165 166][165 161]]
  </code></pre>
  
  <p>The results are right (in Python the index is MATLAB-1), but the order is different. Does anyone have a solution for that? I need Python's order to be the same as MATLAB's order.</p>