Implementation of force directed algorithm in OpenGL