Cone-ray intersections
A finite cone with caps can also be constructed as intersection of an infinite cone with a slab.
Intersections are computed exactly in the same way as for the cylinder, but instead of the quadratic equation for the infinite cylinder the equation for the infinite cone is used, and the caps may have different radii.
Both for cones and cylinders intersections can be computed somewhat more efficiently if we first transform the ray to a coordinate system aligned with the cone (cylinder). This requires extra programming to find such transformation.