How to create the perfect 3D hair strokes by machine