//line and //curve by @orthoplex64

All credit goes to @orthoplex64
This PR is merely a rebased version of his.

Closes #254