Info

This question is closed. Reopen it to edit or answer.

Two points to start with, looking for a function such that ratio of distances to these function is constant.

1 view (last 30 days)
Title is very unclear, I was unable to explain it one sentence. The problem that I have consists of two parts.
1) The first part I will try to explain by giving a similar problem from which the answer is well known. If you have a point , and a line. And you are looking for a function such that the distance from the point to that function is equal to the distance from the line to the function. The function describing this problem is a parabola, see figure:
Now the problem that I have: I have two points, P1 and P2, and an associated ratio for these points, say for instance a ratio M = 0,4 . I am looking for a function that describes all the points x, such that M = P1x / P2x
I have tried to make this more clear with the figure below, I am looking for the formula that describes the red line such that for every point on the line: D1/D2 = S1/S2 = M
Is there an analytical formula describing this function?
2) now part two of this problem. I don't have 2 points, but 17 points.
Point P2 is my 'reference' point, I have a ratio for all my points wrt to P2. So a ratio for P3 & P2, P4 & P2 and so on. For each of these pair of points with corresponding ratio I want to plot a such a function, and I was wondering how to do this.
I have coordinates of all these points. If someone knows an analytical funtion for my problem, do you also know how to implement this for my problem?
And for the case there is no analytical solution , I thought of the following approach: for P1 and P2. draw for each point a few concentrical circles. For each circle around P1 with a certain radius R, P2 has also a circle with radius R/M. Determine where those circles cross and fit a function between these crossing.
This is the idea I thought of, but I have literally no idea how to implement this in MatLab, so I was wondering if someone had a better idea to this problem in the case of no analytical solution, or someone knows how to implement this idea.
  1 Comment
John D'Errico
John D'Errico on 10 May 2017
Sigh. I'll give you one hint: Write down what the ratio of distances means. IN MATHEMATICS. Don't use words. Write it down.
If D1/D2=M, then you know that D1^2=M^2*D2^2. Now do a little algebra. Expand and collect terms. Do you recognize the result? Hint: as long as M is not 1, think circle. If M==1, you have a circle with infinite radius, sometimes known as a line.
The rest of your question makes no sense at all, where you have 17 points. Sorry, but you need to do some serious thinking. There is no MATLAB code that you can write until you actually understand the mathematics.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!