examples/3d/pointCloudExample/README.md
--
This openFrameworks Example is demonstrates how to create a [point cloud] (https://en.wikipedia.org/wiki/Point_cloud) of data points in 3d space from an image, and represented by a mesh to represent the exterior surface.
After studying this example, you will understand how to
In the code, pay attention to:
ofSetVerticalSync to synchronize the redraw of the screen to the vertical refresh of your screenmesh.setMode(OF_PRIMITIVE_POINTS);img.load and then examining the pixels in the image by looping through the grid of pixels and getting color with img.getColor(x,y)float z = ofMap(cur.a, 0, 255, -300, 300);ofEnableDepthTest to ensure rendering happens according to z-depth rather than draw order.glEnable(GL_POINT_SMOOTH) to make the points roundglPointSize(3) to the points biggerofScale(2,-2,2) to flip the y axis and zoom the item inofRotateY(90) to rotate on the y axis so we are looking at the face from the side.cam.begin use of an ofEasyCam to render the sceneWhen launching this app, you should see
Instructions for use: