I would like to generate graphs randomly, like this:



I think, that ShapeRenderer in libgdx can help to solve this. I would like to generate randomly x, y coordinates, then draw circles, but I do not know how to draw lines randomly between the circles?
Can you please show me some working tutorials?