Visualization of graphs in 3d space