from left to right-
Philip III: King of Spain and Portugal (1598 - 1621)
Philip IV: King of Spain and Portugal (1621 - 1665)
Charles II: King of Spain and Portugal (1665 - 1700)
Much like pedigree selection in the science of animal husbandry, hereditary monarchies around the world adhere to a strict form of selective breeding. This is due to a belief that Royal blood is inherently superior to "commoner" blood. Thus, Royal bloodlines are painstakingly preserved for centuries by keeping the breeding confined to an elite few. But this form of controlled inbreeding among close relatives can have a detrimental effect on a gene pool (called "inbreeding depression"), which leads to some pretty horrific mental and physical disabilities.
The Habsburg family of Spain and Austria provides a dramatic example. Generations of rampant inbreeding led to the development of an inherited deformity that became known as the "Habsburg lip". The "Habsburg lip" was characterized by a protruding lower jaw, which often led to difficulties chewing, speaking and keeping one's mouth closed.
Philip IV (son of Philip III), suffered from prominent "Habsburg lip", as well as a difficulty in producing a suitable heir. In his lifetime, Philip had fifteen children with two separate wives. But most of his children were physically degenerate, and most died in childhood. However, the need to name an heir was absolute, and Philip had no choice but to hand the throne to his youngest son Charles II (son of Queen Mariana of Austria... Philip's second wife and niece).
In King Charles was manifested centuries of tainted Habsburg genes. Charles' "Habsburg lip" was so pronounced, he was unable to chew food. His tongue was so large, he was unable to speak intelligibly. He was so severely mentally handicapped, he was never given an education or taught to read. By the time he reached his thirties, Charles' was fully bald, epileptic, and unable to walk. Towards the end of his 35 year reign, the Spanish people began to believe that he was possessed by the devil, and so Charles II became known as "The Bewitched". A marriage was arranged for him, but he was physically incapable of fatherhood. When Charles II died heirless in 1770, the Habsburg bloodline died with him.
The progression of the genetic devolution is apparent in the Royally commissioned portraits of the three monarchs (painted by El Greco, Velasquez, and Juan Carreno de Miranda). Though its safe to assume that the portraits are flattering to their subject, the progression of the hereditary deformities are clearly visible from generation to generation.