Scientists take a look at the math and science of hair