3

I want to find the equation of one curve in $X-Y$ plan which satisfies the functions as follows:

1) $A(x_1,y_1)$, $B(x_2,y_2)$ are two known points and $f(x,y)$ (or $y(x)$) is the equation of the curve we want to find;

2) $f(x,y)$ pass A and B;

3) the tangent vector of $f$ at A is $v_A=(v_{ax},v_{ay})$ and at B is $v_B=(v_{bx},v_{by})$, and $||v_A||=||v_B||=1$.

I think that there is a group of curves which satisfy these conditions, so I want to add one more condition:

4) the length of $f $ from A to B or from B to A is the minimum.

Now how many curves are there? and how to get the equations? If you want, you can answer with a numercial example. For example, $A=(0,0),B=(1,2),f'(A)=(-1,0),f'(B)=(0,1)$.

This problem stops my work a long time, so thanks for your help.

DanielV
  • 24,386
Martial
  • 1,724
  • 1
  • 14
  • 19
  • As I understand, your curve is defined by $f(x,y)=\text{const.}$, so the value of $f$ can be chosen arbitrary, without changing the curve. Then, what do you have in mind as integral of $f$ from A to B, do you mean the curve's length? – flonk Feb 28 '14 at 09:40
  • yes, I mean that the length of the curve between A and B is minimal. Perhaps we can suppose f(x,y)=0 and try to find the expression of f. – Martial Feb 28 '14 at 22:16
  • @Martial If you told us the context, we might be able to give you better constraints. As Frederick says "Any continuous infinitely differentiable function" is too broad to have an answer, but for something like "any cubic" or "any parameterization of 2 quadratics" there are probably several people who can help you. Do you need this to be computable? Is it for software, graphics, etc? You are vaguely describing a graphics concept called splines, which are cubic equations. I suggest looking up splines and seeing if that is related to your application. – DanielV Mar 01 '14 at 01:00
  • @DanielV Can you give an argument, why you think the variational problem should have no unique solution? – flonk Mar 01 '14 at 14:29
  • Thank you all. The context is that some vehicle like car goes to B from A in the shortest possible time with a permanent velocity and the directions of the car at A and B are defined. Now I want to know the track of this car and demonstrate mathematically that this track is the shortest. – Martial Mar 01 '14 at 14:55
  • @Martial Then the constraint we are missing seems to be the turn radius of the car. At that point it becomes a problem of drawing circles adjacent to the start and end points and tangent to direction, and tangent lines connecting the circle (valid tangent lines depends on if your car is allowed to go "backwards") and finding the shortest tangent line. Of course, if you want the fastest path and not just the shortest, then friction/acceleration/max speed becomes an issue. – DanielV Mar 01 '14 at 20:55
  • @Martial If that helps, your problem without condition (4) has a long history in mathematics as Eulers Elastic problem. So what you seek is exactly the shortest solution to Eulers elastical problem. I bet there must be research on that, but I wasn't able to find some :( – flonk Mar 01 '14 at 21:05
  • @DanielV We can suppose that the module of velocity of the car is always a fixed value, so the friction... can be ignored. then the shortest path is also the fastest path. The car is certainly able to go backwards. The problem is how far it should go back. – Martial Mar 03 '14 at 10:26

4 Answers4

2

Unless the directions specified by $f'(A), f'(B)$ are in line with the straight line connecting the points I suspect that you can't find such a function. In particular, there seems to be a family of curves connecting the points, and satisfying your conditions but where the length of the family approaches that of the straight line. Of course, this means that the limiting function can't itself work.

Consider the following family:

animation

Frederick
  • 272
2

First you have 2 given points and the direction the car is facing:

Initial Position

Then draw the 2 tangent circles to each position with a radius given by the turn radius of the car:

Tangent circles

Then find the line segments that are tangent two circles, one from each given point. Only 3 are shown here, but since each circle contributes two locations, there are a total of 16 tangent line segments:

Tangent lines

Then find the length of each of the 16 paths. A path is the car turning along the circle, following and tangent line segment to the other circle, and the finishing along the other circle. This is where you have to decide if the car is allowed to drive backwards. If not, some of the paths will be invalid as the car would have to travel backwards at some point. Blue is an example of one path:

Major MSPaint Artwork right here.

The shortest of the paths is the shortest route the car can take. Note that the instant change from turning to straight isn't actually physically possible unless you stop the car and then turn the wheels and then start again, but there are a substantial number of details like that I mentioned earlier (friction, acceleration, top speed) that can make this problem hideous. However, it sounds like this is simple enough for your purposes.

DanielV
  • 24,386
  • thank you. In fact I have several choices for the vehicle. If I choose a nonholonomic mobile robot with two symtrical wheels, then the turn radius is 0. As you explain, should the robot firstly turn the direction to point B, then go to B and then adjust the orientation? But this solution has a problem: if the position of the target point B changes with time, the robot will always adjust the orientation. So what I want is that the robot(or car) could simultaneously go towards B and adjust the orientation. – Martial Mar 04 '14 at 08:50
1

Perhaps your question is similar to this one: Fastest curve from $p_0$ to $p_1$ ?

Han de Bruijn
  • 17,475
1

Just an idea:

It might be more suitable, to formulate the problem for a parametrized curve. This gives a variational problem for two functions $$\vec{r}(t)=(x(t),y(t))$$

with 8 side conditions $$\vec{r}(0)=(x_a,y_a), \qquad \vec{r}(1)=(x_b,y_b),$$ $$\dot{\vec{r}}(0)=(v_{ya},-v_{xa}),\qquad \dot{\vec{r}}(1)=(v_{yb},-v_{xb})$$ that minimizes the length integral

$$\int_0^1 dt \frac{dL}{dt}(t)$$

flonk
  • 2,474