Spectral analysis of random geometric graphs