Posted: 13th Sep 2018 10:52
Posted: 27th Sep 2009 12:20 Link
Well... i had this nice long detailed explanation written out, and then my computer decided to crash...

Anyways, basically, a parametric line is this:

x=(x2-x1)L+x1
y=(y2-y1)L+y1

and given L between 0 and 1, x and y will be between x1 to x2 and y1 to y2.

and a line perpendicular to that is

x=(y1-y2)L+x1
y=(x2-x1)L+y1

if you want a long explanation as to why that is, i'll gladly rewrite my essay . Here is some code demonstrating my humongous breakthrough: