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

Pages: 1-

Dividing up a line continued

Name: Anonymous 2006-04-10 7:02


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

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 ?
 answer : The point at some fraction r of the way through is:
( r(x2-x1)+x1 , r(y2-y1)+y1 )

Now if i want say the point 2 "fractions" down the line, eg if R = 3 I can get 1/3rd down the line, how do i get 2/3's ?

Name: Anonymous 2006-04-10 7:35

Now if i want say the point 2 "fractions" down the line, eg if R = 3 I can get 1/3rd down the line, how do i get 2/3's ?
No. You don't use R=3 with that formula to get '1/3rd down the line', you use R=1/3. Similarly, you can just use R=2/3. This is fairly elementary math btw, you could probably figure these things out yourself if you put a little more thought into it.
And you could've just put this in the original thread.

Name: Anonymous 2006-04-10 7:43

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

Isn't that wrong though? if you do that, the distance will be r*sqrt(2) away from the point instead of r, because you are going r both vertically and horizontally. i gave another solution in the original thread.

Name: Anonymous 2006-04-10 7:44

^bleh, ignore that, I might have got it wrong.

Name: Anonymous 2006-04-10 8:33 (sage)

>>3,4
Distance from point 1 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^2 + ((r(y2-y1)+y1)-y1)^2 )=
sqrt( (r(x2-x1))^2 + (r(y2-y1))^2 ) =
sqrt( r^2*(x2-x1)^2 + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2.

Name: Anonymous 2006-04-10 12:40

1 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^2 + ((r(1 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^2 + ((r(y2-y1)+y1)-y1)^2 )=
sqrt( (r(x2-x1))^2 + (r(y1 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^2 + ((r(y2-y1)+y1)-y1)^2 )=
sqrt( (r(x2-x1))^2 + (r(y2-y1))^2 ) =
sqrt( r^2*(x2-x1)^2 + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2. + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2. ) =
r * distance from point 1 to point 2.)1 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^2 + ((r(y2-y1)+y1)-y1)^2 )=
sqrt( (r(x21 to ( r(1 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+1 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^2 + ((r(y2-y1)+y1)-y1)^2 )=
sqrt( (r(x2-x1))^2 + (r(1 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^21 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^2 + ((r(y2-y1)+y1)-y1)^2 )=
sqrt( (r(x2-x1))^2 + (r(y2-y1))^2 ) =
sqrt( r^2*(x2-x1)^2 + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2.y1))^2 ) =
sqrt( r^2*(x2-x1)^2 + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2.^2 ) =
r * distance from point 1 to point 2. to point 2.x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^2 + ((r(y2-y1)+y1)-y1)^2 )=
sqrt( (r(x2-x1))^2 + (r(y2-y1))^2 ) =
sqrt( r^2*(x2-x1)^2 + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2.x2-x1)^2 + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2.+y1)-y1)^2 )=
sqrt( (r(x2-x1))^2 + (r(y2-y1))^2 ) =
sqrt( r^2*(x2-x1)^2 + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2.2 + (r(y1 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^2 + ((r(y2-y1)+y1)-y1)^2 )=
sqrt( (r(x2-x1))^21 to ( r(x2-x1)+x1 , r(y2-y1)+y1 ) =
sqrt( ((r(x2-x1)+x1)-x1)^2 + ((r(y2-y1)+y1)-y1)^2 )=
sqrt( (r(x2-x1))^2 + (r(y2-y1))^2 ) =
sqrt( r^2*(x2-x1)^2 + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2. + (r(y2-y1))^2 ) =
sqrt( r^2*(x2-x1)^2 + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2.2-y1))^2 ) =
sqrt( r^2*(x2-x1)^2 + r^2*(y2-y1)^2 ) =
r * sqrt( (x2-x1)^2 + (y2-y1)^2 ) =
r * distance from point 1 to point 2.

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