same way that fetus grows them: by producing hormones and other chemicals that instruct cells to turn into tooth or eye cells.
Teeth and eyes are pretty complex structures, so it takes a lot of very special hormones in correct doses and the right time, so tumors with eyes and teeth are very very rare.
Latest Answers