Chapter 1 Exercise Topics 5

xiaoxiao2021-03-06  64

5. Two line segments: ab = (xe1, ye1) - (XP1, YP1), CD = (XE2, YE2) - (XP2, YP2) The linear equation is: y = k1x b1, y = k2x b

2k and B are equal to: k = (ye-yp) / (XE-XP) / (XE-XP), B = (YEXP-YPXE) / (XP-XE) two line segments have intersection, and can be obtained by X = (B2-B1) / (K1-K2) and this X If (Xe1, XP1) is in (XE2, XP2), it can be said to be intended. If not in the range, the description line segment is short, can't make it. The front is calculated, and there is a formula. One of the places that need to be judged is to calculate the divisor of K and B, one is equal to K1 and K2.

转载请注明原文地址:https://www.9cbs.com/read-85637.html

New Post(0)