Character displacement and niche shift analyzed using consumer-resource models of competition.