Principles and Mechanism of Weaving