Mathematical Methods in Preindustrial Technology and Machines