I'm trying to create a graph with as many straight edges as possible between points without allowing any of the edges to intersect in Java. Basically, I'm trying to make a planar graph with a random amount of points. I somewhat understand how to detect a planar graph when given a graph that already has edges but I'm confused about how to actually create a planar graph from just random nodes. The only way that comes to mind is to randomly create graphs and then test them but this seems very inefficient.
Thanks