In this invention, there is provided a system which can visually indicate to the surgeon an ideal angle for the acetabular cup during a total hip replacement procedure, wherein the system uses a robotic system which orients an elongated guide at the preferred axis for the acetabular cup.