What algorithm or formula can it be ascertained whether the point between the parallel straight?



  • There are two parallel straight equations:

    a1x + b1y + c1 = 0
    a2x + b2y + c2 = 0.

    How to determine whether the P(x, y) point is between them?



  • For example, this is how:

    Let n - the general vector normalized your direct, A1 and A2 - 1st and 2nd straight points, respectively X - Checkpoint. Calculate the scalary works (XA1, n) and (XA2, n)♪ The point lies inside if these works have the opposite sign.


    Not necessarily parallel direct and stupid corner, we' corner. two Normal vector n1 and n2♪ Then the following values should be established: isFirstDirectionPositive - the sign of the polar work (XA1, n1) (respectively, the result of the setting of the point in the first straight equation), isSecondDirectionPositive - the sign of the polar work (XA2, n2) (respectively, the result of the point set in the second straight equation) and isAngleBetweenNormalsAcute - the sign of the polar work (n1, n2)♪ You need a piece of work. All three The signs were positive.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2