Average-case analysis of algorithms for convex hulls and Voronoi diagrams