THE EVOLUTION OF REPTILES
Reptiles existed on the earth for roughly 100 million years before the first dinosaur
appeared.

As you can see from the partial geological time scale to the above, reptiles evolved
from amphibians sometime during the Carboniferous Period.
What's the difference between amphibians and reptiles? In other words, what specific
evolutionary development changed an amphibian into a reptile? Oddly enough, it was not
some adaptation to the animal's body, but a change in reproduction - the development of
the amniotic egg.
Prior to the development of the amniotic egg, amphibians were "chained" to
the ocean or some other large body of water, because they had to lay their eggs in water.
If the eggs were removed from water and placed on land, they would simply dry out,
obviously killing the egg. Imagine a map with only areas within about a mile or so of the
ocean, rivers and lakes marked in blue. This would be about the limits of the colonization
of the land by early amphibians.
The solution to this problem (the amniotic egg, see figure below) is basically a
little environmental pod, like a spacecraft. The egg has the amniotic sac which contains
the embryo immersed in amniotic fluid, a food supply (the yolk), a storage area for
solid waste (allantois), and of course, the shell. But the shell is really the
major development in a number of ways. Since there is no supply of air within the egg (as
you would need in a space ship), the shell must allow oxygen in and gaseous
respiratory waste (carbon dioxide) out. To do this the shell is actually porous on a
microscopic scale. However, simply making the shell porous does not solve the problem,

because we actually end up back where we started since a porous shell would
also allow the loss of water along with the carbon dioxide. The result would be a hard
shell with a dried out interior (dead egg)! The solution to this is the thin layer of
tissue called the chorion (this is the "skin" you see when you peel a
hard-boiled egg). This tissue allows oxygen and carbon dioxide to pass through by osmosis,
but is impermeable to water, so the egg retains its moisture. With all these features, an
amniotic egg can be buried in the sand, or placed in a nest in a tree or wherever, and
still survive. The amniotic egg opened up any portion of the earth's land suitable for
reptiles for their colonization.
THE DIVERGENCE OF REPTILES - SYNAPSIDS AND DIAPSIDS
Sometime during the Permian two major clades of reptiles diverge (or evolve) from the
original Anapsid reptiles. These are the Synapsids (one temporal fenestra below the
squamosal and postorbital bones of the skull) and the Diapsids (two temporal fenestra -
one above and one below the squamosal and postorbital bones). Both groups are extremely
important because the Synapsids will eventually lead to the evolution of mammals, while
the diapsids will give rise to the dinosaurs.

The Synapsid Reptiles
There are two main groups of Synapsid reptiles - the Pelycosaurs and the
Therapsids.
Starting in the early Permian Period the Pelycosaurs become a very important group,
with the carnivorous Dimetrodon, as seen above, being the most well known example.
These reptiles are commonly referred to as the "sailbacks" for obvious reasons.
In general, they are still a very primitive reptile group, with both the fore- and
hind-limbs sprawled outwards to the side of the body, and with undifferentiated teeth (Dimetrodon
has all fangs, big and little, but still all fangs; while Edaphosaurus,
a herbivorous pelycosaur has all small peg-like teeth). The main evolutionary novelty
developed by this group is the "fin" or "sail" on its back, which is
formed by an extreme elongation of the neural spines of the animal's vertebrae. Some
paleontologists have suggested that the purpose of the fin was to make the animal look
larger in order to scare away attackers (in the same way a cat puffs up when it is
frightened); while others have speculated that the fin may have been brightly colored for
mate attraction.
The most generally accepted hypothesis, however, is that the fin was an early
evolutionary attempt at thermoregulation. The pelycosaurs were still cold blooded
ectotherms, but the sail is believed to have acted as a large solar panel. Each of the
elongate neural spines which formed the framework of the fin had a deep groove which is
believed to have held a large vein. If this is the case, the skin between the elongate
spines would have held large numbers of blood vessels making it a thin, blood charged
membrane. If the animal turned so that sunlight hit the fin all along one side, the result
would have been a fairly rapid warming of the animals blood, allowing the animal to warm
up quickly. On the other hand, if the animal had become overheated through exertion, it
could face into the wind and the fin would act just like a fin on your car's radiator,
allowing for rapid shedding of heat, and the cooling of the body.
Note that the animal would still be an ectotherm, but this use
of the fin for thermoregulation may have been one of the first cases of modifying a part
of an animal's body into a large thin membrane to help control body temperature. The same
principle is still in use among modern animals like the elephant, whose large thin ears
allow it to shed excess body heat and prevent overheating.
THERMOREGULATION
Thermoregulation simply means an animal's ability to control its body temperature.
Fish, amphibians and reptiles are ectothermic (cold blooded) because they have a
low rate of metabolic heat generation and therefore need to take heat from their external
environment in order to warm up their bodies to a functional temperature. This is why
reptiles are often seen in the morning basking in the sunlight. Without that heat from the
sun they would remain lethargic all day and would be unable to function. Since their body
temperature is to a large extent dependent on the temperature of their environment, the
opposite condition also applies - if they get overheated they must hide in the shade in
order to cool down, otherwise they would die from heat stress.
Birds and mammals on the other hand have a high rate of metabolic heat generation which
allows them to maintain a constant body temperature despite fluctuations in the
temperature of their environment. They are called endothermic (warm blooded). In
these animals overheating is prevented by losing heat through sweating, panting, etc.,
although a nice shady tree is also a big help.
The obvious advantage to endothermy is that you are never at other than full operating
temperature (unless the environmental conditions turn extreme). In other words you never
end up in a situation where you see a carnivore coming at you, but you're just too
sluggish to move. The down side is that if you are going to supply your own heat through a
high metabollic rate you need lots of fuel - endotherms need to eat much greater amounts
of food than ectotherms. An alligator needs to eat about once a month. If a lion ate once
a month you would end up with a dead lion.
Therapsid Reptiles - The "Mammal-like" Reptiles

By the middle of the Permian Period a new group of Synapsids had appeared. These were
the Therapsids, also known as the "mammal-like" reptiles. A quick look at Lycanops
(above) will allow you to understand why these reptiles are called
"mammal-like". This animal could probably be mistaken for a cat or dog by an
average person. They are much more advanced than their cousins the pelycosaurs in
that they are developing an upright stance - the legs are tucked under the body, not
sprawled out to the sides. Also we begin to see differentiation of the teeth.
The therapsids diversify rapidly in the Permian, and fill numerous ecologic niches
including

that of large herbivores. Moschops (above) is an example of a large
herbivorous therapsid. It's barrel-like chest and peg-like teeth clearly identify it as a
plant eater.
The main importance of the therapsids is that they are within the clade which will
eventually give rise to the mammals.
Thermoregulation in Therapsids??
Some people have speculated that some of the therapsids may have been endothermic, and
even gone so far as to depict therapsids with hair or fur. There is no direct evidence to
support this. However, there is some circumstantial evidence. During the Permian the
therapsids extended their range far to the south (their remains are found today in South
Africa which was much farther south during the Permian). The best evidence we have
indicates that these regions were high temperate to subarctic, and no other reptiles are
found there. As a result some scientists have speculated that the therapsids may have been
warm blooded (a necessary condition to survive in that climate). The fur or hair would
have been necessary as insulation. But it is important to remember that, as yet, there is
no hard evidence to support this hypothesis.
The Diapsids - the Other Side of the Family Tree
While the therapsids dominated the Permian, another group - the Diapsids - had evolved
from the original Anapsid reptiles. Following the massive extinction event that marks the
end of 
doubt this model. The result is that there are two models for the rise of the dinosaurs
to dominance during the Triassic. The old model is called the Competitive Displacement
Model, while the new one is the Opportunistic Model.
In the figure to the left, the Competitive Displacement Model is illustrated in (a).
Here, the idea is that because of some dinosaur traits which made them better adapted for
survival during the Triassic, they gradually out competed the other reptiles, and took
over the world (something like Bill Gates and Microsoft). What were those traits?
Supporters of this model point to the upright stance of the dinosaurs ( in some cases they
were even bipedal). In general, animals with an upright stance do have an advantage over
those with a sprawled stance due to Carrier's Constraint (sprawled animals cannot
run and breathe at the same time). So proponents of the Competitive Displacement Model
argue that the dinosaurs had superior locomotion and respiration, and also probably had
higher metabolisms and maybe thermoregulation (endothermy).
Those who favor the opportunistic model (b) argue that as a result of a mass extinction
near the end of the Triassic, large numbers of reptile species were eradicated and the
dinosaurs were simply the first and fastest to take advantage of the situation and
diversify to fill all the then vacant niches. That's why their model has the sharp
vertical boundaries - no gradual displacement , but a very rapid extinction followed by
opportunistic diversification.
Proponents of the Opportunistic Model make the following arguments. First, the fossil
record does not support the Competitive Displacement Model. The dinosaurs appear to
diversify rapidly in the late Triassic only after the extinction event results in major
losses among the therapsids and the archosaurs (other than dinosaurs). Second, the
superior adaptations argument is weak because other archosaurs and therapsids also appear
to have developed an erect gate. Further, endothermy in early dinosaurs is by no means a
proven fact. Third, the idea that competition among species can have a major, long-term
effects may very well be an extreme oversimplification. Lastly, they point to a possible
smoking gun - the large crater in Manicougan, Quebec (roughly 65 km in diameter) which
dates from about 215 million years ago. A near perfect match with the timing of the Late
Triassic extinction event. This, they claim is evidence that the dinosaurs took over only
after the extinction (due to the impact) of the other animals.
So who's right? Right now, the Opportunistic Theory appears to receive the most
support, but that may change. The idea that an impact could cause such massive worldwide
effects is still being debated. Even the end Cretaceous impact (which supposedly killed
off the dinosaurs) is not unanimously accepted as the cause for dinosaur extinction, and
that crater is at least 125km in diameter.