Solve for D given A, B, C and CD length, parallel to AB

I am trying to figure out how to do this. In fact, I have points A and B, the location of which I know. Then I have point C and point D, in which I know only the coordinates of C. I know the length of the CD and I know that the CD must be parallel to AB. How could I generally decide for D, given A, B, C and the length of the CD.

alternative text http://img706.imageshack.us/img706/4494/imgclr.png

+5
source share
6 answers

D = C ± (BA) / | BA | * | CD |

If B = A, then there is no solution, since the line AB degenerates into a point, and the parallel line with the point is not defined.

Explanation

(B-A)/| B-A | - . | C-D | .

: + ±, . B = A.

+9

, , .

"" , (Ay-By)/(Ax-Bx) ( Ay - y A ..). M, .

, :

= (Cy-Dy)/(Cx-Dx) = M

(Cy-Dy) = M*(Cx-Dx)

, C->D - ( L). ,

(Cy-Dy)^2+(Cx-Dx)^2 = L^2

, :

(M^2+1)(Cx-Dx)^2 = L^2

, , M, L Dx, :

Cx = ((L^2)/(M^2+1))^0.5 + Dx

Cx (, , ), Cy.

, , , Cx , , Cy. D.

Edit:

, , (.. Ax-Bx = 0). , Cy.

+3

v= A - B. , C D. , D= C + & lambda; v, & lambda;. C D, d. d = | D - C | = | C + & lambda; v - C | = | & Lambda; | v, v = | v | - v. , | & Lambda; | = d/v, & lambda; = ± d/v.

FYI, | u | u= (x, y) | u | = sqrt (x ^ 2 + y ^ 2), .

+1

A B, AB.

D, -. , CD , AB, parellel.

0

T (x) - x

T (a) = c, T (b) = d

, , a c b.

: , , , d, . - d c.

0

.

- ( ), = (Yb-Ya)/(Xb-Xa), (Yd-Yc)/(Xd-Xc), .

- , L ^ 2 = (Xd-Xc) ^ 2 + (Yd-Yc) ^ 2, L - C-D.

m D X Y ( ) :

Xd = Xc + (L ^ 2/(1 + m ^ 2)) ^ 0,5

Yd = Yc + m (Xd - Xc)

0

All Articles