Fast 3d generation with precomputed slices