Plot a vector of a given length from a given point in a certain direction

Task diagram

Please point to the correct course of thought about the problem (see the picture).): - There is a Cam camera, it rotates around the coordinate center. - There is a Marker Marker. Its coordinates are known, as are the coordinates of the camera. It is static.

You need to: find a point on the circle around the marker that would lie on the segment drawn from the marker to the camera (or vice versa). Simply put, I need the coordinates of a vector, the length of the radius of the circle, plotted from the marker towards the camera.

So far, I've only thought of subtracting vectors to get a vector from the camera to the marker. Next , only the poke method, which has not yet led to anything good.

If possible, I want to solve the problem without matrices and trigonometry, for performance reasons.

Author: aleksandr barakin, 2015-12-24

1 answers

L^2 = (x2-x1)^2 + (y2-t1)^2

X3 = x1 + R/L * (x2 - x1)

Similar to y3

enter a description of the image here

 1
Author: splash58, 2015-12-24 20:20:13