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?
The monorail explodes before I can get on it
What's the minimum number of sensors for a hobby GPS waypoint-following UAV?
How can an advanced civilization forget how to manufacture its technology?
Why did my rum cake turn black?
Novel where a group of scientists in a spaceship encounter various aliens
Is Arc Length always irrational between two rational points?
Why would guns not work in the dungeon?
How can I get a player to accept that they should stop trying to pull stunts without thinking them through first?
What do the horizontal lines in a P-V phase diagram mean?
Did any of the founding fathers anticipate Lysander Spooner's criticism of the constitution?
During copyediting, journal disagrees about spelling of paper's main topic
Can I call 112 to check a police officer's identity in the Czech Republic?
Cubic programming and beyond?
How do Windows version numbers work?
What is this welding tool I found in my attic?
Referring to different instances of the same character in time travel
CentOS 7 -> find: missing Argument for "-exec"
How to hide what's behind an object in a non destructive way / give it an "invisibility cloak"
Matchmaker, Matchmaker, make me a match
How did the hit man miss?
Supporting developers who insist on using their pet language
Is lack of functional requirements agile?
Why does the autopilot disengage even when it does not receive pilot input?
Simple LED driver, transistor and GPIO
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;
$begingroup$
I want to create a simple line with two points that can be dragged (one at a time), as in image below:
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
$endgroup$
add a comment |
$begingroup$
I want to create a simple line with two points that can be dragged (one at a time), as in image below:
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
$endgroup$
add a comment |
$begingroup$
I want to create a simple line with two points that can be dragged (one at a time), as in image below:
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
$endgroup$
I want to create a simple line with two points that can be dragged (one at a time), as in image below:
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
graphics interactive
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
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
Manipulate[
Graphics[Line[pt1, pt2], PlotRange -> 2], pt1, 0, 0,
Locator, pt2, 0, 1, Locator]
$endgroup$
add a comment |
$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]]
]
$endgroup$
add a comment |
$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)]
$endgroup$
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
$begingroup$
Manipulate[
Graphics[Line[pt1, pt2], PlotRange -> 2], pt1, 0, 0,
Locator, pt2, 0, 1, Locator]
$endgroup$
add a comment |
$begingroup$
Manipulate[
Graphics[Line[pt1, pt2], PlotRange -> 2], pt1, 0, 0,
Locator, pt2, 0, 1, Locator]
$endgroup$
add a comment |
$begingroup$
Manipulate[
Graphics[Line[pt1, pt2], PlotRange -> 2], pt1, 0, 0,
Locator, pt2, 0, 1, Locator]
$endgroup$
Manipulate[
Graphics[Line[pt1, pt2], PlotRange -> 2], pt1, 0, 0,
Locator, pt2, 0, 1, Locator]
answered 8 hours ago


Rohit NamjoshiRohit Namjoshi
1,9871 gold badge4 silver badges16 bronze badges
1,9871 gold badge4 silver badges16 bronze badges
add a comment |
add a comment |
$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]]
]
$endgroup$
add a comment |
$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]]
]
$endgroup$
add a comment |
$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]]
]
$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]]
]
answered 8 hours ago
C. E.C. E.
53.1k3 gold badges102 silver badges210 bronze badges
53.1k3 gold badges102 silver badges210 bronze badges
add a comment |
add a comment |
$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)]
$endgroup$
add a comment |
$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)]
$endgroup$
add a comment |
$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)]
$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)]
answered 2 hours ago
kglrkglr
204k10 gold badges233 silver badges463 bronze badges
204k10 gold badges233 silver badges463 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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