Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] line perpendicular to a parametric line.

Author
Message
Hoang Vuong
User Offline
Joined: 13th Sep 2018
Location:
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:

Login to post a reply

Server time is: 2018-11-14 05:43:44
Your offset time is: 2018-11-14 05:43:44