title: Save a point cloud on as an image, considering the size and distance of each point
body: <p>I want to save an entire point cloud as an image, considering the size and distance of each point.
  I represent the pixels of the image as a one dimensional array the represents the pixels and their RGB values.</p>
  
  <p>Right now, in order to print a point, what I do is the following:</p>
  
  <pre><code>int pixelIndex = ((int)yValue*this.imageWidth + (int)xValue) * 3;
  rgbData[pixelIndex] = double2byte(pointCloud.getR());
  rgbData[pixelIndex + 1] = double2byte(pointCloud.getG());
  rgbData[pixelIndex + 2] = double2byte(pointCloud.getB());
  </code></pre>
  
  <p>I want to take into consideration the size of each point and their distance from the screen.</p>
  
  <p>As an example, let's the every point has the size of 3. So each point should be rendered as a 3x3 square. But, one point is at a distance of 1 from the screen and another point as at a distance of 1.7. The farther point should be shown as a smaller point that the closer point.
  Plus, the spaces between the points should also take into consideration the difference in sizes.</p>