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;
$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