Download Touch Line Controller Free Unity.
Draw lines using mouse or touch input. The component captures all data points which then can be read.
Configure to optionally identify if trajectory intersects itself.
Easily extend to use custom type of lines by creating new materials or editing the line renderer properties.