Ms. Whelan has performed a broader and more varied repertory than almost any other female principal in City Ballet’s history, spanning romantic, classical and contemporary roles with extraordinary versatility and range. But although she excelled in, and often seemed definitively to embody, many of the ballets by George Balanchine and Jerome Robbins that form the backbone of the repertoire, she has perhaps been most closely identified with the creation of new ballets, as a kind of muse who enables the best work from choreographers.

William Forsythe, Wayne McGregor, Jorma Elo, Benjamin Millepied, Twyla Tharp, Lynn Taylor-Corbett and Peter Martins, the company’s ballet master in chief, have, among many others, chosen her for their pieces. (By her count, she has originated 40 principal roles in the repertory.) But her strongest choreographic affiliations over the last 15 years have been with Mr. Wheeldon and Mr. Ratmansky, who have arguably created their finest works with Ms. Whelan.

“I think I first fell in love with the shape of her legs,” said Mr. Ratmansky, who had been rehearsing with Ms. Whelan earlier in the day on his newest piece for City Ballet, which had its premiere on Thursday. “The length from ankle to knee and knee to hip is perfectly proportioned, very graceful and strong. The quality of movement really depends on these kinds of structures, and this explained to me a lot about her unusual quality and sensuality. She is a major ballerina, exceptional and different.”

That Ms. Whelan is still dancing at a high level, and plans to continue collaborating with choreographers after leaving City Ballet, is itself notable. By dinosaur age, around 40, most female ballet dancers are feeling the severe physical toll taken by the relentless demands of classical technique: turning out from the hips, the constant wear and tear on joints and muscles. Ms. Whelan has been one of the fortunate few who have managed the intersection of technical prowess and mature artistry; until she began to have hip problems in 2012, she was relatively injury free, and after a hip reconstruction last year, she has rebounded with remarkable facility.