- 我有 A 点和另一个点(如 B、C 或 D)的坐标。
- 我还有 A 到另一点之间的距离。
- 我知道 A 和另一点之间的最大允许距离(用紫色线和假想圆表示)。
- 问题:如何找到红点(B1 或 C1 或 D1)的坐标。
- 示例:A=(-1,1), E=(3,-8),最大允许距离 = 4。E1 点的坐标是多少?
这是问题的图像:
注意:
我发现了另外两个非常相似或相同的问题,但我无法解决这些问题:
查找两点之间的点的坐标?
如何我可以仅使用线段的部分长度找到放置在形成线段的 2 个点之间的点吗?
PS 这不是作业,我需要这个来解决编程问题,但我忘记了数学...
- I have the coordinate of point A and another point (like B, C or D).
- I also have the distance between A and the other point.
- I know the maximum allowed distance between A and the other point (illustrated with the purple line and the imaginary circle).
- Question: How do I find the coordinates of the red points (B1 or C1 or D1).
- Example: A=(-1,1), E=(3,-8), Max allowed distance = 4. What is the coordinate of point E1?
Here is an image of the problem:
Note:
I found 2 other questions that are pretty similar or equal but I'm not able to work it out with those:
Finding coordinates of a point between two points?
How can I find a point placed between 2 points forming a segment using only the partial length of the segment?
P.S. This is not homework I need this for a programming problem but I forgot my Maths...
发布评论
评论(1)
假设 A 是位置向量,B 是位置向量,maxLength 是允许的最大长度。
A
和B
是Vector2
(正如您标记此问题xna)。Assuming A is a position vector, B is a position vector, and maxLength is the max length you're allowing for.
A
andB
areVector2
's (as you tagged this question xna).