Distance measures on a map of a gamemin distance in a graphShortest distance path on contour plotHow to plot...

What is the command to reset a PC without deleting any files

Extreme, but not acceptable situation and I can't start the work tomorrow morning

Copycat chess is back

When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

How to make payment on the internet without leaving a money trail?

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

Can a planet have a different gravitational pull depending on its location in orbit around its sun?

COUNT(*) or MAX(id) - which is faster?

How to manage monthly salary

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

Shall I use personal or official e-mail account when registering to external websites for work purpose?

How to deal with fear of taking dependencies

What is GPS' 19 year rollover and does it present a cybersecurity issue?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

extract characters between two commas?

How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)

New order #4: World

Why was the "bread communication" in the arena of Catching Fire left out in the movie?

Information to fellow intern about hiring?

Pristine Bit Checking

"listening to me about as much as you're listening to this pole here"

Add an angle to a sphere

Are white and non-white police officers equally likely to kill black suspects?

Why is my log file so massive? 22gb. I am running log backups



Distance measures on a map of a game


min distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera













8












$begingroup$


I have an image which my DM made of map for a DND game and I want to do two things.




  • Click on two points on my map, then based on the key for scaling have Mathematica tell me how far apart those points are.


  • Given a distance and a point that I click on, draw a circle about the given point that has the radius of the given distance.



enter image description here



If anyone will give me advice for how to get started on this project, I would be very grateful.










share|improve this question











$endgroup$

















    8












    $begingroup$


    I have an image which my DM made of map for a DND game and I want to do two things.




    • Click on two points on my map, then based on the key for scaling have Mathematica tell me how far apart those points are.


    • Given a distance and a point that I click on, draw a circle about the given point that has the radius of the given distance.



    enter image description here



    If anyone will give me advice for how to get started on this project, I would be very grateful.










    share|improve this question











    $endgroup$















      8












      8








      8


      5



      $begingroup$


      I have an image which my DM made of map for a DND game and I want to do two things.




      • Click on two points on my map, then based on the key for scaling have Mathematica tell me how far apart those points are.


      • Given a distance and a point that I click on, draw a circle about the given point that has the radius of the given distance.



      enter image description here



      If anyone will give me advice for how to get started on this project, I would be very grateful.










      share|improve this question











      $endgroup$




      I have an image which my DM made of map for a DND game and I want to do two things.




      • Click on two points on my map, then based on the key for scaling have Mathematica tell me how far apart those points are.


      • Given a distance and a point that I click on, draw a circle about the given point that has the radius of the given distance.



      enter image description here



      If anyone will give me advice for how to get started on this project, I would be very grateful.







      geographics interactive user-interface distance






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 5 hours ago







      Wombles

















      asked yesterday









      WomblesWombles

      1445




      1445






















          2 Answers
          2






          active

          oldest

          votes


















          12












          $begingroup$

          enter image description here



          Both tasks you outlined could be fused into a single app - screenshot is above. I assume that because this is a game the corrections due to geodetic model (flat map from non-flat planet surface) do not really matter (this was not mentioned in the project description). Here is a quite simple code to get you started that you can modify and upgrade.



          i = Import["https://i.stack.imgur.com/TVsMy.jpg"];

          Manipulate[
          Column[{
          Style["Advantures will take you "<>
          ToString[Round[.7595 RegionMeasure[N[Line[pt]]],.01]]
          <>" miles",20,FontFamily->"Herculanum"],
          HighlightImage[i,{Thickness[.003],Dashing[.01],
          Line[pt],
          Circle[pt[[1]],EuclideanDistance@@pt[[;;2]]]},
          ImageSize->800]
          },Alignment->Center],
          {{pt,{{1610,100},{2005,100}}},Locator,LocatorAutoCreate->True}]


          A few things to take a note:




          • In addition to the distance between 2 points you can build a whole path and measure its length.


          • Add or remove more path points with CMD(ALT)+CLICK on Mac (Win).


          • Decreasing image size will make your app faster


          • Scaling factor in front of RegionMeasure can be adjusted to match map scale. It is done by simply running app for the firs time when in initial stage the path is equal to the map scale length (see next image below). Then adjust the scaling factor so number in the title is equal to the number on the map scale.


          • In the initial state there are only 2 points and a circle centered at 1st and passing through 2nd. Dragging locators around and see how number in the title changes effectively solves your second task. Place 1st point at a needed location and then drag 2nd to measure needed radius that is indicated in the plot title and you get the circle you need.



          enter image description here






          share|improve this answer











          $endgroup$









          • 1




            $begingroup$
            This is amazing, thank you so much. One quick question though, I don't seem to be able to add the additional points like in your first screen shoot (in using windows)
            $endgroup$
            – Wombles
            5 hours ago












          • $begingroup$
            @Wombles you are welcome :) Read docs HERE especially details section. I corrected the post - on Win it is ALT+CLICK. Thanks for noting!
            $endgroup$
            – Vitaliy Kaurov
            5 hours ago






          • 1




            $begingroup$
            Yes, fantastic answer Vitaliy. I have often wanted to use Mathematica for my own DnD game - perhaps now I will :)
            $endgroup$
            – Carl Lange
            5 hours ago










          • $begingroup$
            Will do, i also need to download that sweet font too.
            $endgroup$
            – Wombles
            5 hours ago



















          3












          $begingroup$

          I have some advice, but it is just that, and not a solution to your problem.




          • Decide on a geodetic model for the world you are mapping. I recommend picking one of the geodetic models of planet Earth that Mathematica recognizes.

          • Decide on what the projection from a sphere to your map grid will be.

          • Use the built-in functions GeoGridPosition and GeoPosition to transform coordinates between the grid (map) and the model (sphere).

          • Look at GeoProjectionData to learn about Mathematica knows about projections.


          Note: depending on the projection you choose, a circle about a point on sphere may not appear as a circle on your map.



          BTW, nice looking map.






          share|improve this answer









          $endgroup$













          • $begingroup$
            Thank you for the advice and the starting point.
            $endgroup$
            – Wombles
            21 hours ago












          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "387"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f194783%2fdistance-measures-on-a-map-of-a-game%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          12












          $begingroup$

          enter image description here



          Both tasks you outlined could be fused into a single app - screenshot is above. I assume that because this is a game the corrections due to geodetic model (flat map from non-flat planet surface) do not really matter (this was not mentioned in the project description). Here is a quite simple code to get you started that you can modify and upgrade.



          i = Import["https://i.stack.imgur.com/TVsMy.jpg"];

          Manipulate[
          Column[{
          Style["Advantures will take you "<>
          ToString[Round[.7595 RegionMeasure[N[Line[pt]]],.01]]
          <>" miles",20,FontFamily->"Herculanum"],
          HighlightImage[i,{Thickness[.003],Dashing[.01],
          Line[pt],
          Circle[pt[[1]],EuclideanDistance@@pt[[;;2]]]},
          ImageSize->800]
          },Alignment->Center],
          {{pt,{{1610,100},{2005,100}}},Locator,LocatorAutoCreate->True}]


          A few things to take a note:




          • In addition to the distance between 2 points you can build a whole path and measure its length.


          • Add or remove more path points with CMD(ALT)+CLICK on Mac (Win).


          • Decreasing image size will make your app faster


          • Scaling factor in front of RegionMeasure can be adjusted to match map scale. It is done by simply running app for the firs time when in initial stage the path is equal to the map scale length (see next image below). Then adjust the scaling factor so number in the title is equal to the number on the map scale.


          • In the initial state there are only 2 points and a circle centered at 1st and passing through 2nd. Dragging locators around and see how number in the title changes effectively solves your second task. Place 1st point at a needed location and then drag 2nd to measure needed radius that is indicated in the plot title and you get the circle you need.



          enter image description here






          share|improve this answer











          $endgroup$









          • 1




            $begingroup$
            This is amazing, thank you so much. One quick question though, I don't seem to be able to add the additional points like in your first screen shoot (in using windows)
            $endgroup$
            – Wombles
            5 hours ago












          • $begingroup$
            @Wombles you are welcome :) Read docs HERE especially details section. I corrected the post - on Win it is ALT+CLICK. Thanks for noting!
            $endgroup$
            – Vitaliy Kaurov
            5 hours ago






          • 1




            $begingroup$
            Yes, fantastic answer Vitaliy. I have often wanted to use Mathematica for my own DnD game - perhaps now I will :)
            $endgroup$
            – Carl Lange
            5 hours ago










          • $begingroup$
            Will do, i also need to download that sweet font too.
            $endgroup$
            – Wombles
            5 hours ago
















          12












          $begingroup$

          enter image description here



          Both tasks you outlined could be fused into a single app - screenshot is above. I assume that because this is a game the corrections due to geodetic model (flat map from non-flat planet surface) do not really matter (this was not mentioned in the project description). Here is a quite simple code to get you started that you can modify and upgrade.



          i = Import["https://i.stack.imgur.com/TVsMy.jpg"];

          Manipulate[
          Column[{
          Style["Advantures will take you "<>
          ToString[Round[.7595 RegionMeasure[N[Line[pt]]],.01]]
          <>" miles",20,FontFamily->"Herculanum"],
          HighlightImage[i,{Thickness[.003],Dashing[.01],
          Line[pt],
          Circle[pt[[1]],EuclideanDistance@@pt[[;;2]]]},
          ImageSize->800]
          },Alignment->Center],
          {{pt,{{1610,100},{2005,100}}},Locator,LocatorAutoCreate->True}]


          A few things to take a note:




          • In addition to the distance between 2 points you can build a whole path and measure its length.


          • Add or remove more path points with CMD(ALT)+CLICK on Mac (Win).


          • Decreasing image size will make your app faster


          • Scaling factor in front of RegionMeasure can be adjusted to match map scale. It is done by simply running app for the firs time when in initial stage the path is equal to the map scale length (see next image below). Then adjust the scaling factor so number in the title is equal to the number on the map scale.


          • In the initial state there are only 2 points and a circle centered at 1st and passing through 2nd. Dragging locators around and see how number in the title changes effectively solves your second task. Place 1st point at a needed location and then drag 2nd to measure needed radius that is indicated in the plot title and you get the circle you need.



          enter image description here






          share|improve this answer











          $endgroup$









          • 1




            $begingroup$
            This is amazing, thank you so much. One quick question though, I don't seem to be able to add the additional points like in your first screen shoot (in using windows)
            $endgroup$
            – Wombles
            5 hours ago












          • $begingroup$
            @Wombles you are welcome :) Read docs HERE especially details section. I corrected the post - on Win it is ALT+CLICK. Thanks for noting!
            $endgroup$
            – Vitaliy Kaurov
            5 hours ago






          • 1




            $begingroup$
            Yes, fantastic answer Vitaliy. I have often wanted to use Mathematica for my own DnD game - perhaps now I will :)
            $endgroup$
            – Carl Lange
            5 hours ago










          • $begingroup$
            Will do, i also need to download that sweet font too.
            $endgroup$
            – Wombles
            5 hours ago














          12












          12








          12





          $begingroup$

          enter image description here



          Both tasks you outlined could be fused into a single app - screenshot is above. I assume that because this is a game the corrections due to geodetic model (flat map from non-flat planet surface) do not really matter (this was not mentioned in the project description). Here is a quite simple code to get you started that you can modify and upgrade.



          i = Import["https://i.stack.imgur.com/TVsMy.jpg"];

          Manipulate[
          Column[{
          Style["Advantures will take you "<>
          ToString[Round[.7595 RegionMeasure[N[Line[pt]]],.01]]
          <>" miles",20,FontFamily->"Herculanum"],
          HighlightImage[i,{Thickness[.003],Dashing[.01],
          Line[pt],
          Circle[pt[[1]],EuclideanDistance@@pt[[;;2]]]},
          ImageSize->800]
          },Alignment->Center],
          {{pt,{{1610,100},{2005,100}}},Locator,LocatorAutoCreate->True}]


          A few things to take a note:




          • In addition to the distance between 2 points you can build a whole path and measure its length.


          • Add or remove more path points with CMD(ALT)+CLICK on Mac (Win).


          • Decreasing image size will make your app faster


          • Scaling factor in front of RegionMeasure can be adjusted to match map scale. It is done by simply running app for the firs time when in initial stage the path is equal to the map scale length (see next image below). Then adjust the scaling factor so number in the title is equal to the number on the map scale.


          • In the initial state there are only 2 points and a circle centered at 1st and passing through 2nd. Dragging locators around and see how number in the title changes effectively solves your second task. Place 1st point at a needed location and then drag 2nd to measure needed radius that is indicated in the plot title and you get the circle you need.



          enter image description here






          share|improve this answer











          $endgroup$



          enter image description here



          Both tasks you outlined could be fused into a single app - screenshot is above. I assume that because this is a game the corrections due to geodetic model (flat map from non-flat planet surface) do not really matter (this was not mentioned in the project description). Here is a quite simple code to get you started that you can modify and upgrade.



          i = Import["https://i.stack.imgur.com/TVsMy.jpg"];

          Manipulate[
          Column[{
          Style["Advantures will take you "<>
          ToString[Round[.7595 RegionMeasure[N[Line[pt]]],.01]]
          <>" miles",20,FontFamily->"Herculanum"],
          HighlightImage[i,{Thickness[.003],Dashing[.01],
          Line[pt],
          Circle[pt[[1]],EuclideanDistance@@pt[[;;2]]]},
          ImageSize->800]
          },Alignment->Center],
          {{pt,{{1610,100},{2005,100}}},Locator,LocatorAutoCreate->True}]


          A few things to take a note:




          • In addition to the distance between 2 points you can build a whole path and measure its length.


          • Add or remove more path points with CMD(ALT)+CLICK on Mac (Win).


          • Decreasing image size will make your app faster


          • Scaling factor in front of RegionMeasure can be adjusted to match map scale. It is done by simply running app for the firs time when in initial stage the path is equal to the map scale length (see next image below). Then adjust the scaling factor so number in the title is equal to the number on the map scale.


          • In the initial state there are only 2 points and a circle centered at 1st and passing through 2nd. Dragging locators around and see how number in the title changes effectively solves your second task. Place 1st point at a needed location and then drag 2nd to measure needed radius that is indicated in the plot title and you get the circle you need.



          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 5 hours ago

























          answered 20 hours ago









          Vitaliy KaurovVitaliy Kaurov

          57.8k6162283




          57.8k6162283








          • 1




            $begingroup$
            This is amazing, thank you so much. One quick question though, I don't seem to be able to add the additional points like in your first screen shoot (in using windows)
            $endgroup$
            – Wombles
            5 hours ago












          • $begingroup$
            @Wombles you are welcome :) Read docs HERE especially details section. I corrected the post - on Win it is ALT+CLICK. Thanks for noting!
            $endgroup$
            – Vitaliy Kaurov
            5 hours ago






          • 1




            $begingroup$
            Yes, fantastic answer Vitaliy. I have often wanted to use Mathematica for my own DnD game - perhaps now I will :)
            $endgroup$
            – Carl Lange
            5 hours ago










          • $begingroup$
            Will do, i also need to download that sweet font too.
            $endgroup$
            – Wombles
            5 hours ago














          • 1




            $begingroup$
            This is amazing, thank you so much. One quick question though, I don't seem to be able to add the additional points like in your first screen shoot (in using windows)
            $endgroup$
            – Wombles
            5 hours ago












          • $begingroup$
            @Wombles you are welcome :) Read docs HERE especially details section. I corrected the post - on Win it is ALT+CLICK. Thanks for noting!
            $endgroup$
            – Vitaliy Kaurov
            5 hours ago






          • 1




            $begingroup$
            Yes, fantastic answer Vitaliy. I have often wanted to use Mathematica for my own DnD game - perhaps now I will :)
            $endgroup$
            – Carl Lange
            5 hours ago










          • $begingroup$
            Will do, i also need to download that sweet font too.
            $endgroup$
            – Wombles
            5 hours ago








          1




          1




          $begingroup$
          This is amazing, thank you so much. One quick question though, I don't seem to be able to add the additional points like in your first screen shoot (in using windows)
          $endgroup$
          – Wombles
          5 hours ago






          $begingroup$
          This is amazing, thank you so much. One quick question though, I don't seem to be able to add the additional points like in your first screen shoot (in using windows)
          $endgroup$
          – Wombles
          5 hours ago














          $begingroup$
          @Wombles you are welcome :) Read docs HERE especially details section. I corrected the post - on Win it is ALT+CLICK. Thanks for noting!
          $endgroup$
          – Vitaliy Kaurov
          5 hours ago




          $begingroup$
          @Wombles you are welcome :) Read docs HERE especially details section. I corrected the post - on Win it is ALT+CLICK. Thanks for noting!
          $endgroup$
          – Vitaliy Kaurov
          5 hours ago




          1




          1




          $begingroup$
          Yes, fantastic answer Vitaliy. I have often wanted to use Mathematica for my own DnD game - perhaps now I will :)
          $endgroup$
          – Carl Lange
          5 hours ago




          $begingroup$
          Yes, fantastic answer Vitaliy. I have often wanted to use Mathematica for my own DnD game - perhaps now I will :)
          $endgroup$
          – Carl Lange
          5 hours ago












          $begingroup$
          Will do, i also need to download that sweet font too.
          $endgroup$
          – Wombles
          5 hours ago




          $begingroup$
          Will do, i also need to download that sweet font too.
          $endgroup$
          – Wombles
          5 hours ago











          3












          $begingroup$

          I have some advice, but it is just that, and not a solution to your problem.




          • Decide on a geodetic model for the world you are mapping. I recommend picking one of the geodetic models of planet Earth that Mathematica recognizes.

          • Decide on what the projection from a sphere to your map grid will be.

          • Use the built-in functions GeoGridPosition and GeoPosition to transform coordinates between the grid (map) and the model (sphere).

          • Look at GeoProjectionData to learn about Mathematica knows about projections.


          Note: depending on the projection you choose, a circle about a point on sphere may not appear as a circle on your map.



          BTW, nice looking map.






          share|improve this answer









          $endgroup$













          • $begingroup$
            Thank you for the advice and the starting point.
            $endgroup$
            – Wombles
            21 hours ago
















          3












          $begingroup$

          I have some advice, but it is just that, and not a solution to your problem.




          • Decide on a geodetic model for the world you are mapping. I recommend picking one of the geodetic models of planet Earth that Mathematica recognizes.

          • Decide on what the projection from a sphere to your map grid will be.

          • Use the built-in functions GeoGridPosition and GeoPosition to transform coordinates between the grid (map) and the model (sphere).

          • Look at GeoProjectionData to learn about Mathematica knows about projections.


          Note: depending on the projection you choose, a circle about a point on sphere may not appear as a circle on your map.



          BTW, nice looking map.






          share|improve this answer









          $endgroup$













          • $begingroup$
            Thank you for the advice and the starting point.
            $endgroup$
            – Wombles
            21 hours ago














          3












          3








          3





          $begingroup$

          I have some advice, but it is just that, and not a solution to your problem.




          • Decide on a geodetic model for the world you are mapping. I recommend picking one of the geodetic models of planet Earth that Mathematica recognizes.

          • Decide on what the projection from a sphere to your map grid will be.

          • Use the built-in functions GeoGridPosition and GeoPosition to transform coordinates between the grid (map) and the model (sphere).

          • Look at GeoProjectionData to learn about Mathematica knows about projections.


          Note: depending on the projection you choose, a circle about a point on sphere may not appear as a circle on your map.



          BTW, nice looking map.






          share|improve this answer









          $endgroup$



          I have some advice, but it is just that, and not a solution to your problem.




          • Decide on a geodetic model for the world you are mapping. I recommend picking one of the geodetic models of planet Earth that Mathematica recognizes.

          • Decide on what the projection from a sphere to your map grid will be.

          • Use the built-in functions GeoGridPosition and GeoPosition to transform coordinates between the grid (map) and the model (sphere).

          • Look at GeoProjectionData to learn about Mathematica knows about projections.


          Note: depending on the projection you choose, a circle about a point on sphere may not appear as a circle on your map.



          BTW, nice looking map.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 21 hours ago









          m_goldbergm_goldberg

          88.3k872199




          88.3k872199












          • $begingroup$
            Thank you for the advice and the starting point.
            $endgroup$
            – Wombles
            21 hours ago


















          • $begingroup$
            Thank you for the advice and the starting point.
            $endgroup$
            – Wombles
            21 hours ago
















          $begingroup$
          Thank you for the advice and the starting point.
          $endgroup$
          – Wombles
          21 hours ago




          $begingroup$
          Thank you for the advice and the starting point.
          $endgroup$
          – Wombles
          21 hours ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematica Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f194783%2fdistance-measures-on-a-map-of-a-game%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

          Castillo d'Acher Características Menú de navegación

          Connecting two nodes from the same mother node horizontallyTikZ: What EXACTLY does the the |- notation for...