X,y), X – x, Y – y – ElmoMC Multi-Axis Motion Controller-Maestro Motion Control User Manual

Page 70: X = x, Y = [(q

Advertising
background image

Appendix C: Intersection point of two lines
defined by the end points

Line

L

1

is defined by its end points

P

1

(X

1

,Y

1

)

and

P

2

(X

2

,Y

2

).

Line

L

2

is defined by end

points

P

3

(X

3

,Y

3

)

and

P

4

(X

4

,Y

4

).

Note:

∆X

1

= X

2

– X

1

,

∆Y

1

= Y

2

– Y

1

, ∆X

2

= X

4

– X

3

,

∆Y

2

= Y

4

– Y

3

,

k

1

= ∆Y

1

/∆X

1

, q

1

= ∆X

1

/∆Y

1

, k

2

= ∆Y

2

/∆X

2

, q

2

= ∆X

2

/∆Y

2

Calculation of the two lines intersection point

(X,Y)

depends on the each line

position

relative to coordinate axes. The following cases are possible.

a)

X

1

≠ X

2

, Y

1

≠ Y

2

, X

3

≠ X

4

, Y

3

≠ Y

4

To define intersection point, use

(X – X

1

)∆Y

1

= (Y – Y

1

)∆X

1

(a3.1)

(X – X

3

)∆Y

2

= (Y – Y

3

)∆X

2

(a3.2)

or

X∆Y

1

– X

1

∆Y

1

= Y∆X

1

– Y

1

∆X

1

(a3.3)

X∆Y

2

– X

3

∆Y

2

= Y∆X

2

– Y

3

∆X

2

(a3.4)

From (a3.3) the results are

X = X

1

+ Yq

1

– Y

1

q

1

(a3.5)

and substituting into (a3.4) the results are

(X

1

+ Yq

1

– Y

1

q

1

)∆Y

2

– X

3

∆Y

2

= Y∆X

2

– Y

3

∆X

2

(a3.6)

that produces

Y = [(q

1

Y

1

+ X

3

– X

1

)∆Y

2

–Y

3

∆X

2

]/(q

1

∆Y

2

– ∆X

2

)

(a3.7)

and X can be calculated by (a3.5).

b)

X

1

≠ X

2

, Y

1

≠ Y

2

, X

3

= X

4

, Y

3

≠ Y

4

To find an intersection point use

(X – X

1

)/∆X

1

= (Y – Y

1

)/∆Y

1

(a3.8)

X = X

3

(a3.9)

Maestro

Software Manual

MAN-MLT (Ver. 2.0)

C-1

Advertising