0
$\begingroup$

I am given a single point (lat, long) on a 2D Cartesian map, along with an angle (in degrees) and distance. I'm trying to find two end points of an arc (as well as other points along that arc) given the above parameters. The point I'm given would be the center of the circle. The distance in this case is the length of the two edges, which would be the radius. Below is an example: enter image description here

So I'm given that bottom point, the angle which in this case is 60 degrees, and the edge lengths which are 200 meters. Need to find the two points at the beginning and end of the arc which are circled in yellow.

Update: Here's what I've done so far (using C# here) -

double a = (givenAngle/ 2) * (Math.PI / 180.0);
double x = givenRange * (Math.Sin(a));
double y = Math.Sqrt(Math.Pow(givenRange, 2) - Math.Pow(x, 2));

I then get the two end points like so:

new Vertex(location.X - x, location.Y + y), new Vertex(location.X + x, location.Y + y)

This gives me: enter image description here

The way my app works is it just connects the vertices I give it. So now I need to get the arc.

$\endgroup$
  • $\begingroup$ Since you already know that this is about trigonometry, I assume you know what sine and cosine functions are. Do you see how you could use them here? $\endgroup$ – Matti P. Oct 10 '18 at 12:13
  • $\begingroup$ What I was thinking was, since both sides will always be the same length, I can split the triangle into two right triangles. Solve for the height and base, then add/subtract those values from my given point to get two new points? $\endgroup$ – pfinferno Oct 10 '18 at 13:08
  • $\begingroup$ I believe you're at the wrong forum here: it appears that the Vertex() function creates a line, not an arc. Can you check the library where the Vertex() function/class belongs to? $\endgroup$ – Dominique Oct 10 '18 at 13:32
  • $\begingroup$ You're correct, but if I could get other points on the arc, it'll connect them together and make something that looks like an arc. The more points the more accurate it will be of course. $\endgroup$ – pfinferno Oct 10 '18 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.