Draw Mesh Strokes

Hello, I have a question. Here is a gif file with short animation from 3d application called "Polybrush", and I want to make a similar feature in maxscript. The main idea of this feature is - there is a pre-prepared object, and when you make brush strokes, a program create a copy of this object, the copy begins in the place you clicked and ends in the place you release a mouse. The difficult part is that new object bends and stretches to the trajectory of mouse movement. Does anyone have an ideas how to make this? Thanks.

polybrush.gif1.18 MB