Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

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

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

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. #1
    Gianmaria is offline 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. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    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
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    Gianmaria is offline 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);
    MapPoint.Shape oMaxCircle = this.mMap.Shapes.AddShape(MapPoint.GeoAutoShapeTyp e.geoShapeRadius, loc, lnKMRadius *2 , lnKMRadius *2);


    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?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. finding the radius of a drawed circle
    By Wilfried in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 06-10-2009, 10:27 PM
  2. Radius of a Circle
    By Gianmaria in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-14-2006, 02:32 PM
  3. Exporting and Importing circle coordinatesq
    By CESENAC in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-17-2006, 03:41 PM
  4. Pushpin and Shaded Circle Size
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-19-2004, 09:23 AM
  5. Using the shaded circle map and linked data, can I....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-10-2001, 08:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25