Блог пользователя C137

Автор C137, история, 10 лет назад, По-английски

Hello everyone

I am facing the following geometry problem, and since am not so good at it, i would ask your help:

We have a straight line that goes throw 3 points, A(X1,Y1) B(X2,Y2) and M(X0,Y0).

We know X1,Y1,X2,Y2 and we know d, the distance between A and M, and we have to define the two possible positions of the pair X0,Y0...

Any Help would be highly appreciated, and thanks in advance...

  • Проголосовать: нравится
  • -6
  • Проголосовать: не нравится

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Here is O(1) solution with some inaccuracy permitted:

You know

You also know slope of line

So, the two possible values of Xm are X1 ± d * cos(z)

Similarly, Ym = Y1 ± d * sin(z)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -15 Проголосовать: не нравится

.