Answer the question
In order to leave comments, you need to log in
How to determine the intersection point of a circle with a certain radius?
Good afternoon, how can you define this?
I have coordinates of point A and B . I also assign the value of the radius r myself. For example, let it be 100. You need to find the coordinates of the point C. Point A coordinates change. X, Y coordinate system.
Answer the question
In order to leave comments, you need to log in
Given points A (Xa, Ya)
, B (Xb, Yb)
, a circle of radius r
centered at the point B
. Find the point C (Xc, Yc)
lying at the intersection of the ray BA
with the circle
Vector BA = {Xa - Xb, Ya - Yb}
;
Its length: |BA| = sqrt((Xa - Xb) ^ 2 + (Ya - Yb) ^ 2)
;
The point C
will be found if the point is shifted B
by a vector BA
divided by its length and multiplied by r
:
Xc = Xb + (Xa - Xb) / |BA| * r,
Yc = Yb + (Ya - Yb) / |BA| * r
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question