Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Simple Q - Dividing up a line

Name: Anonymous 2006-04-09 7:58

Hi, Simple question :

If there is a line from (x1 , y1 ) to (x2, y2)

I have the length L using pythagoras method.

If i want to find a Point on the line a fraction of the way through it , Eg. 1/5 through the line how do i do it ?

Name: Anonymous 2006-04-09 8:47

There are many ways you could do it, since know how far from start you want to be in the line and you know the angle the line makes with the horizontal, you can find how far horizontally and vertically you will have to move to get to the new point.

Name: Anonymous 2006-04-09 8:54

Here is a illustration of what I meant. Sorry for the bad writing. Using my touchpad.

http://img354.imageshack.us/img354/2438/untitled9we1.png

Name: Anonymous 2006-04-09 9:24

The point at some fraction r of the way through is:
( r(x2-x1)+x1 , r(y2-y1)+y1 )

Name: Anonymous 2006-04-09 10:07

thanks =]

Don't change these.
Name: Email:
Entire Thread Thread List