Transforming the graph of a rational function