Created
July 24, 2019 03:30
-
-
Save slvrfn/0039032857e3ca53cddf4069b776b1bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//obtain new point on the line defined by (x0,y0) to (x1,y1) | |
//a t in the range [0,1] sits on the line | |
//a t > 1 sits on the line past (x1,y1) | |
function proj(x0, y0, x1, y1, t){ | |
return [((1-t)*x0)+(t*x1), ((1-t)*y0)+(t*y1)]; | |
} | |
//https://math.stackexchange.com/a/1630886/368351 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment