Welcome to MapForums!

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

## Different angles of a circle drown

This is a discussion on Different angles of a circle drown within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I've a geometric matter....I've drawn a circle on the map... till now everithing ok. From this circle i know ...

1. Member Yellow Belt
Join Date
Dec 2004
Posts
47

## Different angles of a circle drown

Hi,
I've a geometric matter....I've drawn a circle on the map... till now everithing ok. From this circle i know radius and center. Now.. i want to draw 2 more lines starting from the center at different angles of the drawn circle..

as

center is 1 and 1.. i've 2 angles form 0 to 360... i want to draw to lines from the center location (i know) to the surface of the circle..

is it possible???

Ragards

2. Yes, so you basically need to know the location on the circle.

You know the starting point, the distance, and the angle, but to use the MapPoint method AddLine or whatever you need to know the location on circle.

It seems like it should be very simple and I'm sure at some point I knew how to do it from math class on a Cartesian plane, but lat/lon always makes it more complicated.

Try this section on the Aviation Formulary --
http://williams.best.vwh.net/avform.htm#LL

Also, in the introduction there is a link to a spreadsheet and implementation notes.

hope this helps!

Eric

3. Member Yellow Belt
Join Date
Dec 2004
Posts
47
Hi Eric,
what i'm looking for are the 2 points on the circumference to track 2 lines from the center of the circle to this points..

In math this points are so esy to find doing this way

Xa = r * sin(angle1)
Xb = r* cos(angle1)

Ya = r* sin(angle2)
Yb = r* cos(angle2)

this is the theory.. but it dont works... so i show you the code i'm using for doing that... i repeat that i have for the circle the center X,Y expressed in lat/Lon the radius of the circle and the two angles.

double lnKMRadius = km2miles(r) * 1.609;
MapPoint.Location loc = this.mMap.GetLocation(Lat, Long, 0);

double Xa = lnKMRadius * sin(angle1);
double Xb = lnKMRadius * cos(angle1);

MapPoint.Location locX = this.mMap.GetLocation(Xa + lat, Xb + long, 0);

so i draw the line.. but the result is not what expected.. the line that have to stop on the circumference goes more over there and the angle for this line is not the right angle.

Any Idea?