Questions tagged [locator]

Questions on position tracking, especially using Mathematica coordinate tracking functions and control objects such as Locator, LocatorPane, and ClickPane.

Filter by
Sorted by
Tagged with
2 votes
0 answers
38 views

Freeze slider if locator moved

I have list of many locators in my Manipulate: {{listoflocs, listoflocsinit }, Locator, LocatorAutoCreate -> True } And I have a slider there: ...
  • 21
0 votes
0 answers
49 views

Reset Button for Manipulate and freezing Sliders

I work on a Bezier curve subdivision project. I managed to implement it, but I faced some problems. (The code of my program is presented below.) Firstly, if I change parameter n after changing other ...
  • 21
5 votes
1 answer
240 views

Calligraphic Pen Signature Pane

This exchange about writing the infinity symbol using a calligraphic pen nib (https://mathematica.stackexchange.com/a/13376/43662) gave me an idea that is a bit steep for me to implement. The idea is ...
  • 1,857
0 votes
1 answer
85 views

Two locators in separate plots using Manipulate

I want to create two figures, side by side, each with an independent Locator. I want to do this using Manipulate, because I can easily use information from each Locator in both plots. This answer did ...
3 votes
2 answers
149 views

Selecting Plot for Locator

Assume I have a manipulate with two graphics/plots as outputs. One of my parameters is a locator. How can I select in which of the plots the locator appears? Let's say I have the output given by this: ...
7 votes
2 answers
240 views

Manipulate[] with interdependent Locators

how would I create a Manipulate to draw a InfiniteLine between two Locator? The first Loactor should control the x/y of the first point together with the y of the second one. The second Locator should ...
4 votes
1 answer
76 views

How to use multiple Locators with different TrackingFunction in Manipulate?

I am trying to use TrackingFunction with Locator inside Manipulate, and it works fine with a ...
  • 217
2 votes
1 answer
60 views

How to restrict a locator to a line that changes based on manipulated variables?

I am trying to have a locator move along a manipulated line but every time I manipulate the variables the locator doesn't move across the new line. How can I get the locator to move across the line ...
3 votes
0 answers
115 views

a "Calculate" button for Manipulate with Locator points

Looking for a methodology where the user can move the points of a Locator and then click a button to ask for calculations to proceed. The motivation for this is that the calculations of the full ...
  • 1,007
3 votes
1 answer
140 views

Removing locators breaks labels

I have some locators in a LocatorPane and want to let users remove them. Unfortunately, it seems doing this conflicts with the ...
  • 30.7k
4 votes
0 answers
60 views

Remove Locator doesn't work

I have the issue that I can't remove Locators, when using LocatorAutoCreate->True. For example the code snippet taken from "LocatorPlane" -> Options-> LocatorAutoCreate ...
  • 81
3 votes
1 answer
63 views

How to make a LocatorPane Appearance option dynamic?

I have a DynamicModule that contains a LocatorPane. The number of locators can be changed. The locators are labelled with a number. When the number of locators are changed the label numbers should ...
  • 15.6k
2 votes
1 answer
60 views

Can I make the locators in a locator pane move over the whole pane?

I'm trying use LocatorPane to produce locators that can move anywhere in the entire row of text I am displaying and not just in one of the rectangles, which is what ...
  • 537
3 votes
1 answer
142 views

How can I prevent TabView from resetting the current tab?

This is a simplification of a problem that has arisen in a project regarding Euclidean activities for verifying proportions via operations on pairs of magnitudes. In the project, the LocatorPane is ...
  • 16.5k
6 votes
1 answer
140 views

How to control two different variables with Locator?

It's my first time here but I didn't find answer to my problem and I can't menage that by myself,Mathematica documentation or even by previous stackexchange problems. In Manipulate I have two ...
  • 225
4 votes
0 answers
33 views

AutoAction not working with Locator and LocatorPane

This code is from the "Neat Examples" part on the LocatorPane page of the documentation: ...
8 votes
1 answer
210 views

How to make a Locator3D/LocatorSphere?

On Making a LocatorSphere: Okay so I'm trying to realize a Locator3D-esque functionality for Mathematica. Something like a <...
1 vote
1 answer
173 views

Fix " not a Graphics primitive or directive" error in Dynamic Locator Pane

I am aware this might seem like a duplicate, however, I have viewed these posts (1 & 2) and have been unable to solve this. ...
  • 537
1 vote
1 answer
145 views

Two locators on two different plots in Manipulate

I am trying to create a Manipulate module that shows two plots, and have locators on each of those plots, as well as two sliders. The locators do do not affect each ...
6 votes
1 answer
113 views

How to implement LocatorAutoCreate functionality using EventHandler[]?

The documentation for LocatorPane says that LocatorPane is a special case of EventHandler, and gives the following code: ...
  • 117
1 vote
1 answer
56 views

Locator position as argument in ImageTrim

I want to create a snippet that shows an image with two locators, and side-by-side with its crop based upon the position of the locators. Here is what I wrote. But it gives error that the list of ...
  • 794
2 votes
1 answer
56 views

How to change color of LocatorPane Dynamic point constrained to LogLogPlot line - when point is above set value?

In the following LogLogPlot, I'd like to have the Dynamic[pt] color change from Purple to <...
  • 167
2 votes
1 answer
51 views

How to constrain LocatorPane Dynamic point to a LogLogPlot line?

LocatorPane constrains to Plot[curve]: ...
  • 167
7 votes
1 answer
219 views

Mean RGB value of a locator region?

i am working at a color deconvolution using Ruifrok and Johnston's method (as described here). To get a custom stain, I need to realize a vector with mean RGB values of a region in a given image. So ...
2 votes
1 answer
98 views

Creating multiple locators in Manipulator with constrained motion

I found a code to create multiple controls for a manipulate with a manipulate input and is working perfectly. ...
9 votes
1 answer
272 views

How to make simple closed curve that can be smoothly morphed using locators

Given a simple closed curve in 2D with some locators on it, I would like to have be able to stretch and squish parts of the curve by moving the locators to morph the curve into another simple closed ...
  • 5,211
7 votes
2 answers
617 views

How to add a point and drag it into position in a 3D plot?

I have some plotted points and I would like to add new points and be able to drag a pre-existing or added point using my mouse. After I am satisfied with the new plot, I would like to extract the ...
3 votes
2 answers
185 views

How to rotate a graph with a locator?

Manipulate[ Graphics[Rotate[Line[{{0, 0}, p}], \[Theta], {0, 0}], PlotRange -> 2], {{p, {1, 1}}, Locator}, {\[Theta], 0, 2 \[Pi]}] I want to rotate a graph ...
  • 75
3 votes
0 answers
50 views

Is it possible to prevent LocatorPane from modifying locator positions unless Alt ket is down?

I am using the LocatorAutoCreate option which allows the user to hold Alt while clicking in order to create/remove locators. However, I need to be able to prevent ...
11 votes
3 answers
335 views

How do I determine which Locator is selected in a LocatorPane with multiple Locators?

This is a cross-post of http://community.wolfram.com/groups/-/m/t/1186782 I am working on something where I need to know which locator out of many is currently being changed. Here is some working ...
  • 3,140
3 votes
1 answer
75 views

Is it possible to use the second argument of Dynamic when the first argument is a list?

I want to make a LocatorPane which allows the user to move the locators, with the restriction that the locators can only be moved to integer coordinates. However, I ...
2 votes
1 answer
156 views

How can I scale a locator's coordinate within an image?

How can I use the Scaled feature and modify the Appearance of the Locator within ...
  • 1,823
1 vote
1 answer
113 views

Initial Value of Locator in Manipulate

Consider the following example: Manipulate[u, {u, Locator}] which evaluates to: Now, if you start moving the locator around, you will see the coordinates update:...
  • 1,008
2 votes
2 answers
126 views

Problems With Locator Position Resetting

I am currently attempting to write code that allows users to add shapes to a window and arrange them to create an image. To do this, I make each shape into a locator. This method seems to work well. ...
  • 23
2 votes
0 answers
135 views

How to fix a locator to a desired plot of a Grid of plots?

In my interactive demonstration there is a grid of plots, where 2 are 1D plots and the other 2 are contour ones. I need a locator placed in one of the contour plots to manipulate the parameters of the ...
1 vote
0 answers
138 views

Constraining locators [duplicate]

Is there any canonical way to constrain locators either continuously (e.g. to lie on the graph of a function) or discretely (snap to grid leaps to mind)? The documentation seems a little sketchy on ...
  • 5,034
1 vote
1 answer
183 views

Making a cursor for graphics using a Locator in LocatorPane

I am trying to add some cursors to a plot. I am using LocatorPane and form the cursors by setting the Appearance option. However, I can't seem to find out how big the cursors will be and I need them ...
  • 15.6k
2 votes
2 answers
243 views

Assign Locator points to a specific plot

Result on the left is not what I intended to do: it has two sets of Locator points. Trying to determine why two sets of Locator points are appearing. I only intended to have one set. Result on ...
  • 1,007
2 votes
2 answers
137 views

Why does `Locator` changes graphics depending on `ImageSize`?

This is driving me nuts. Consider this Manipulate command ...
1 vote
0 answers
205 views

Implementing a Locator for Graphics3D drawing tools for programmatic drawing

As a hobby I write from time to time some tools for programmatic technical drawing. Below I give an example of a function modifyGraphics[] which enables one to fast ...
4 votes
1 answer
185 views

Performance issue of Manipulate with NSolve and Locator

I want to solve a nonlinear equation eq in a Manipulate environment as the following one using a ...
3 votes
1 answer
105 views

References in the map + References in a Locator

...
3 votes
1 answer
268 views

Overlaying an image with a movable disk that can be resized

I'm trying to create this: A map with a PNG picture in the background A locator for position The locator (p1) needs to have a disk with center in p1 The problem is that the locator disk and the map ...
2 votes
0 answers
85 views

How constrain a Locator to follow a list of points inside Manipulate?

I would like position two locators on discrete positions which are list's elements and represent a list of point's coordinates. I've ani image and on this I've detected ten circle shape. Now I'd like ...
  • 21
6 votes
1 answer
191 views

Constraining locators in a locator pane to a specified data set

What is the best method to constrain multiple locator points to a set of data? A while back, I needed a program that could perform a linear fit for a specified range of data points. In an effort to ...
6 votes
2 answers
592 views

Insert new points at specific places in the Locator Pane?

I am trying to make some BSplineCurve examples for my students. For fun I created the following Manipulate that draw an elephant using ...
  • 1,047
2 votes
2 answers
137 views

Dynamic locator: update to new position inside `Manipluate`

I'd like the locator to update to its new position when k is altered: ...
  • 8,302
3 votes
2 answers
170 views

Preventing LocatorPane Locator from moving when PlotRange changes

I have a LocatorPane within a Manipulate such that the range of the plot behind the Locator ...
  • 33
3 votes
1 answer
79 views

Context-aware Locator

I'm trying to use a Locator for some image processing tasks. Unfortunately, the images we're using have a high dynamic range of low-frequency black and white ...
  • 1,770
3 votes
1 answer
386 views

How to use locator continuously with grid of graphics

I am trying to find out, how to properly use a locator continuously within manipulate and a grid of graphics. I have the following example out of this code ...