Percolation of randomly centered rods and spheres