On the optimal shape of hip implants