An Efficient Algorithm for Ray Casting of CSG Animation Frames