title: Transform 3D to PointCloud
body: <p>I'm working with Persistent Homology and I need cloud points of common 3D shapes to be able to test my methods.</p>
  
  <p>The problem is that I'm a Java programmer and Java doesn't offer such tools, but I'm pretty sure Matlab does... I tried reading about this here:</p>
  
  <pre><code>http://www.mathworks.com/help/vision/ref/pcfitsphere.html
  http://www.mathworks.com/help/matlab/ref/sphere.html
  http://www.mathworks.com/help/vision/ref/pcshow.html#inputarg_ptCloud
  </code></pre>
  
  <p>Those links provide information on Spheres and PointClouds, but I've never programmed on matlab so I can't even propose code.</p>
  
  <p>Is there a way to take a 3d shape, get it's point cloud and print the point cloud on the console?
  Like:</p>
  
  <p>x0, y0, z0</p>
  
  <p>x1, y1, z1</p>
  
  <p>x2, y2, z2</p>
  
  <p>...
  What I was doing was creating a Java class that printed random points based on a function, so for example I'd give my program the function of a sphere... But it gets super complicated when I'm trying to create functions of pyramids or three-torus.</p>