A survey of ray-surface intersection algorithms