Random geometric graphs with applications