How do you create draggable points inside a graphic image?Real Size Image PrintingCan individual locators in LocatorPane be temporarily disabled?Interactive graphics without creating a new cellHow to feed parameters obtained from direct 3D manipulation back into Manipulate's controls?Narrow a Drawing Tools WindowTracing an image to produce a vector graphicSpeed Up Sampling of Perimeter of Polygonexport video of dynamic graphics in complex manipulate interfaceHow to prerender / rasterize a graphic without losing location informationHow do you glue a text to a point?

What is this welding tool I found in my attic?

A pyramid from a square

What's the maximum time an interrupt service routine can take to execute on atmega328p?

What species of wasp is this? And how to get rid of them?

Should I intentionally omit previous work experience when applying for jobs?

Does Google Maps take into account hills/inclines for route times?

Managing and organizing the massively increased number of classes after switching to SOLID?

Is there any word for "disobedience to God"?

What do the horizontal lines in a P-V phase diagram mean?

How can I deal with a player trying to insert real-world mythology into my homebrew setting?

The monorail explodes before I can get on it

Print the last, middle and first character of your code

Are randomly-generated passwords starting with "a" less secure?

<schwitz>, <zwinker> etc. Does German always use 2nd Person Singular Imperative verbs for emoticons? If so, why?

definition of "percentile"

How can an advanced civilization forget how to manufacture its technology?

CentOS 7 -> find: missing Argument for "-exec"

Flatten array with OPENJSON: OPENJSON on a value that may not be an array? [ [1] ], vs [1]

Cops: The Hidden OEIS Substring

Is lack of functional requirements agile?

Why were Er and Onan punished if they were under 20?

Single word for "refusing to move to next activity unless present one is completed."

What's the minimum number of sensors for a hobby GPS waypoint-following UAV?

I wrote two alternate fugue expositions for one subject do both follow good harmonic conventions?



How do you create draggable points inside a graphic image?


Real Size Image PrintingCan individual locators in LocatorPane be temporarily disabled?Interactive graphics without creating a new cellHow to feed parameters obtained from direct 3D manipulation back into Manipulate's controls?Narrow a Drawing Tools WindowTracing an image to produce a vector graphicSpeed Up Sampling of Perimeter of Polygonexport video of dynamic graphics in complex manipulate interfaceHow to prerender / rasterize a graphic without losing location informationHow do you glue a text to a point?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2












$begingroup$


I want to create a simple line with two points that can be dragged (one at a time), as in image below:



enter image description here



How can I do that without using sliders, but rather dragging the points themselves. I suspect that one uses Manipulate and Graphics in some fashion but I am not sure.










share|improve this question











$endgroup$


















    2












    $begingroup$


    I want to create a simple line with two points that can be dragged (one at a time), as in image below:



    enter image description here



    How can I do that without using sliders, but rather dragging the points themselves. I suspect that one uses Manipulate and Graphics in some fashion but I am not sure.










    share|improve this question











    $endgroup$














      2












      2








      2





      $begingroup$


      I want to create a simple line with two points that can be dragged (one at a time), as in image below:



      enter image description here



      How can I do that without using sliders, but rather dragging the points themselves. I suspect that one uses Manipulate and Graphics in some fashion but I am not sure.










      share|improve this question











      $endgroup$




      I want to create a simple line with two points that can be dragged (one at a time), as in image below:



      enter image description here



      How can I do that without using sliders, but rather dragging the points themselves. I suspect that one uses Manipulate and Graphics in some fashion but I am not sure.







      graphics interactive






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 7 hours ago









      Somos

      2,8301 gold badge2 silver badges11 bronze badges




      2,8301 gold badge2 silver badges11 bronze badges










      asked 8 hours ago









      Bob UelandBob Ueland

      5292 silver badges14 bronze badges




      5292 silver badges14 bronze badges




















          3 Answers
          3






          active

          oldest

          votes


















          3












          $begingroup$

          Manipulate[
          Graphics[Line[pt1, pt2], PlotRange -> 2], pt1, 0, 0,
          Locator, pt2, 0, 1, Locator]





          share|improve this answer









          $endgroup$




















            5












            $begingroup$

            Here is how you would do it with LocatorPane:



            pt1 = 0, 0;
            pt2 = 0, 2;
            LocatorPane[
            Dynamic[pt1, pt2],
            Dynamic@Graphics[
            Line[pt1, pt2]
            ,
            PlotRange -> -5, 5, -5, 5
            ],
            Appearance ->
            Graphics[Red, PointSize[Large], Point[0, 0]],
            Graphics[Blue, PointSize[Large], Point[0, 0]]

            ]


            enter image description here






            share|improve this answer









            $endgroup$




















              2












              $begingroup$

              You can also use a single control for multiple locators:



              Manipulate[Graphics[Line[pts], PlotRange -> 2], 
              pts, 0, 0, 1, 1, Locator, Appearance -> (Style["●", #, 16] & /@ Red, Green)]


              enter image description here






              share|improve this answer









              $endgroup$















                Your Answer








                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%2f201942%2fhow-do-you-create-draggable-points-inside-a-graphic-image%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                3












                $begingroup$

                Manipulate[
                Graphics[Line[pt1, pt2], PlotRange -> 2], pt1, 0, 0,
                Locator, pt2, 0, 1, Locator]





                share|improve this answer









                $endgroup$

















                  3












                  $begingroup$

                  Manipulate[
                  Graphics[Line[pt1, pt2], PlotRange -> 2], pt1, 0, 0,
                  Locator, pt2, 0, 1, Locator]





                  share|improve this answer









                  $endgroup$















                    3












                    3








                    3





                    $begingroup$

                    Manipulate[
                    Graphics[Line[pt1, pt2], PlotRange -> 2], pt1, 0, 0,
                    Locator, pt2, 0, 1, Locator]





                    share|improve this answer









                    $endgroup$



                    Manipulate[
                    Graphics[Line[pt1, pt2], PlotRange -> 2], pt1, 0, 0,
                    Locator, pt2, 0, 1, Locator]






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 8 hours ago









                    Rohit NamjoshiRohit Namjoshi

                    1,9871 gold badge4 silver badges16 bronze badges




                    1,9871 gold badge4 silver badges16 bronze badges























                        5












                        $begingroup$

                        Here is how you would do it with LocatorPane:



                        pt1 = 0, 0;
                        pt2 = 0, 2;
                        LocatorPane[
                        Dynamic[pt1, pt2],
                        Dynamic@Graphics[
                        Line[pt1, pt2]
                        ,
                        PlotRange -> -5, 5, -5, 5
                        ],
                        Appearance ->
                        Graphics[Red, PointSize[Large], Point[0, 0]],
                        Graphics[Blue, PointSize[Large], Point[0, 0]]

                        ]


                        enter image description here






                        share|improve this answer









                        $endgroup$

















                          5












                          $begingroup$

                          Here is how you would do it with LocatorPane:



                          pt1 = 0, 0;
                          pt2 = 0, 2;
                          LocatorPane[
                          Dynamic[pt1, pt2],
                          Dynamic@Graphics[
                          Line[pt1, pt2]
                          ,
                          PlotRange -> -5, 5, -5, 5
                          ],
                          Appearance ->
                          Graphics[Red, PointSize[Large], Point[0, 0]],
                          Graphics[Blue, PointSize[Large], Point[0, 0]]

                          ]


                          enter image description here






                          share|improve this answer









                          $endgroup$















                            5












                            5








                            5





                            $begingroup$

                            Here is how you would do it with LocatorPane:



                            pt1 = 0, 0;
                            pt2 = 0, 2;
                            LocatorPane[
                            Dynamic[pt1, pt2],
                            Dynamic@Graphics[
                            Line[pt1, pt2]
                            ,
                            PlotRange -> -5, 5, -5, 5
                            ],
                            Appearance ->
                            Graphics[Red, PointSize[Large], Point[0, 0]],
                            Graphics[Blue, PointSize[Large], Point[0, 0]]

                            ]


                            enter image description here






                            share|improve this answer









                            $endgroup$



                            Here is how you would do it with LocatorPane:



                            pt1 = 0, 0;
                            pt2 = 0, 2;
                            LocatorPane[
                            Dynamic[pt1, pt2],
                            Dynamic@Graphics[
                            Line[pt1, pt2]
                            ,
                            PlotRange -> -5, 5, -5, 5
                            ],
                            Appearance ->
                            Graphics[Red, PointSize[Large], Point[0, 0]],
                            Graphics[Blue, PointSize[Large], Point[0, 0]]

                            ]


                            enter image description here







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 8 hours ago









                            C. E.C. E.

                            53.1k3 gold badges102 silver badges210 bronze badges




                            53.1k3 gold badges102 silver badges210 bronze badges





















                                2












                                $begingroup$

                                You can also use a single control for multiple locators:



                                Manipulate[Graphics[Line[pts], PlotRange -> 2], 
                                pts, 0, 0, 1, 1, Locator, Appearance -> (Style["●", #, 16] & /@ Red, Green)]


                                enter image description here






                                share|improve this answer









                                $endgroup$

















                                  2












                                  $begingroup$

                                  You can also use a single control for multiple locators:



                                  Manipulate[Graphics[Line[pts], PlotRange -> 2], 
                                  pts, 0, 0, 1, 1, Locator, Appearance -> (Style["●", #, 16] & /@ Red, Green)]


                                  enter image description here






                                  share|improve this answer









                                  $endgroup$















                                    2












                                    2








                                    2





                                    $begingroup$

                                    You can also use a single control for multiple locators:



                                    Manipulate[Graphics[Line[pts], PlotRange -> 2], 
                                    pts, 0, 0, 1, 1, Locator, Appearance -> (Style["●", #, 16] & /@ Red, Green)]


                                    enter image description here






                                    share|improve this answer









                                    $endgroup$



                                    You can also use a single control for multiple locators:



                                    Manipulate[Graphics[Line[pts], PlotRange -> 2], 
                                    pts, 0, 0, 1, 1, Locator, Appearance -> (Style["●", #, 16] & /@ Red, Green)]


                                    enter image description here







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered 2 hours ago









                                    kglrkglr

                                    204k10 gold badges233 silver badges463 bronze badges




                                    204k10 gold badges233 silver badges463 bronze badges



























                                        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%2f201942%2fhow-do-you-create-draggable-points-inside-a-graphic-image%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

                                        Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                                        Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                                        199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單