
So I have a arbitary line (See an example shown in fig 1) made up of n points<
I have figured out a way to calculate the outline points of a line. For each point of the original line you will have to compute 2 points for the outline:
The colors above correspond to this image.
I have programmed this function in C, but I used Accelerate Framework so it's not very easy to read. You can find the source code here and a video running the demo here.