Building a 3D Graph