I just feel pretty stupid, because I can't find a solution for my problem. Maybe someone can help me please:

I have the values Y1 and X1 (where X1 is always bigger than Y1). If I want to draw a curve between the two points y1, x1 based on a circle (no ellipse), how to find out the y2 value which would be the center of the cycle and the radius (r)? I think the circle's radius would get bigger and it's center would move down on the y-axis the greater x1 is (if Y1 doesn't change), right?

example

有帮助吗?

解决方案

This is simply a math question. First of all you should find the middle of the two points Y1 (0,10) and X1 (20,0) which is (10,5). Now we should determine the slope of the line which is perpendicular on the line between X1 and Y1. That slope is equal to 20/10=2 Thus the equation of that line will become y-5=2*(x-10) and thus y=2x-15

To find the coordinates of Y2 we have to find the point where the x value is 0. that is on y=-15. Thus the Y2 coordinate is (0,-15). You can find the value for Y2 in the same way for other values than 20 and 10.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top