0

I need to have a parametric formula that given a start point (Lat, Long), end point (Lat, Long) and center and a parameter t gives me a point in the arc between those 2 points. I need to calculate all the given points in the arc to after that draw it in a map.

I researched the equations for the circle, arcs can't seem to adapt to my specific circumstances. Can anyone help?

Thanks in advance!

  • There is a slight problem with the problem as stated, because given a center and a first point, there is no guarantee that the end point will lie on the circle too. – Alexander Geldhof Jun 21 '19 at 13:27
  • 1
    Hi, for the data I am given there is a guarantee that both the start point and end point are points in the arc. – Tio Google Jun 21 '19 at 13:29

1 Answers1

0

Assuming the center lies in $(0,0)$. You should know how to calculate the radius. The parametrisation of the circle itself is $t \mapsto R \cdot (\cos(t), \sin(t))$. Calculate which $t$ get mapped to the first and second point; say those values are $1$ and $2.5$, then your parametrisation is simply $\gamma: [1; 2.5] \to Circle: t \mapsto R \cdot (\cos(t), \sin(t))$.

If the center does not line in the origin,but in $(a,b)$, first translate all your points (center, start, end) by the vector $-(a,b)$. Now the center does lie in the origin. Calculate your parametrisation, and then add $(a,b)$ to it to get the parametrisation for the circle arc with center at $(a,b)$

Alexander Geldhof
  • 2,439
  • 1
  • 6
  • 14
  • Thanks for the answer! @Alexader Geldhof Just to be clear I would have for each coordinate: $x = R \cdot \cos(t) + $center.x

    And the same for $y$ but with a $\sin(t)$

    I would then solve the equation for $t$ with the start and end point and use that as the limitation.

    One of the things that has been bugging me is that I am calculating the radius and is giving me an expression in meters. Is that gonna work the same or do I need to adapt that as well?

    – Tio Google Jun 21 '19 at 13:51
  • Yes, that's exactly the general parametrisation of a circle with radius $R$ and center $(x,y)$! What is giving you an expression in meters? As long as the coordinates are expressed in meters too, there should be no problem. – Alexander Geldhof Jun 21 '19 at 14:35