title: Point cloud projection to 2D
body: <p>There is a point cloud inside a sphere of radius <code>r</code>, and the coordinate system of these points is in the center of the sphere. The idea is to "take photos" of this cloud since there are many points of view in the surface of the sphere. The "camera" position depends on the angles theta (azimuths) and phi (elevation), as shown in the image. I need at least 10000 images or points of view. </p>
  
  <p>How could I handle this?</p>
  
  <p><a href="https://i.stack.imgur.com/bZv5w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bZv5w.png" alt="enter image description here"></a></p>
  
  <p><strong>I have done:</strong></p>
  
  <p>Following <a href="https://stackoverflow.com/questions/9605556/how-to-project-a-3d-point-to-a-3d-plane">this link</a> I've projected the points to each plane as I also needed to visualize them in 3D. Like this:</p>
  
  <p><a href="https://i.stack.imgur.com/YyUlC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YyUlC.png" alt="enter image description here"></a></p>
  
  <p>So I have the coordinates of the projected points who belong to the plane of the "photo" but still with the original coordinate system.</p>
  
  <p>The plane is defined by:</p>
  
  <pre><code>U = {-sin(theta), cos(theta), 0}
  V = {cos(theta)*sin(phi), sin(theta)*sin(phi), cos(phi)}
  Center = {cos(theta)*cos(phi), sin(theta)*cos(phi), sin(phi)}*r
  </code></pre>
  
  <p>But I am blocked passing from 3D to 2D. </p>