Skip to main content

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
1 vote
1 answer
35 views

Interactive input of integer-coordinate 2D points

I'd like code to allow interactive input of a chain of 2D points, which are saved in some global variable. And in addition, I would like to constrain the coordinates to be integers. The code below is ...
Joseph O'Rourke's user avatar
2 votes
2 answers
90 views

Locator control position changes

When only the g1 graph was drawn, the locator was in the desired position. However, when I expressed the two graphs vertically using the Coulmn function, the position of the locator changed. How can I ...
Soon's user avatar
  • 648
0 votes
1 answer
53 views

TrackingFunction does not work when more than one Locator in Manipulator

TrackingFunction example Manipulate[ Graphics[Circle[], PlotRange -> 2], {{pt, {0, 0}}, Locator, TrackingFunction -> (pt = #/Max[Norm[#], 1]; &)}] ...
eason's user avatar
  • 197
2 votes
0 answers
41 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: ...
jkjfgk's user avatar
  • 21
0 votes
0 answers
64 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 ...
jkjfgk's user avatar
  • 21
5 votes
1 answer
254 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 ...
Nicholas G's user avatar
  • 1,981
0 votes
1 answer
115 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 ...
Eric Hester's user avatar
3 votes
2 answers
195 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: ...
Andrés Morales's user avatar
7 votes
2 answers
251 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 ...
Robert Nowak's user avatar
4 votes
1 answer
101 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 ...
FrankM's user avatar
  • 217
2 votes
1 answer
65 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 ...
user76275's user avatar
3 votes
0 answers
141 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 ...
user6546's user avatar
  • 1,069
3 votes
1 answer
141 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 ...
M.R.'s user avatar
  • 31.5k
4 votes
0 answers
67 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 ...
Merrx's user avatar
  • 81
3 votes
1 answer
71 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 ...
Hugh's user avatar
  • 16.5k
2 votes
1 answer
62 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 ...
Tim B's user avatar
  • 547
3 votes
1 answer
166 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 ...
DavidC's user avatar
  • 16.7k
6 votes
1 answer
153 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 ...
Lechuu's user avatar
  • 534
4 votes
0 answers
35 views

AutoAction not working with Locator and LocatorPane

This code is from the "Neat Examples" part on the LocatorPane page of the documentation: ...
player4321980's user avatar
8 votes
1 answer
230 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 <...
CA Trevillian's user avatar
1 vote
1 answer
271 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. ...
Tim B's user avatar
  • 547
1 vote
1 answer
196 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 ...
Jānis Lazovskis's user avatar
6 votes
1 answer
129 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: ...
user63017's user avatar
  • 117
1 vote
1 answer
62 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 ...
Chromatic's user avatar
  • 794
2 votes
1 answer
65 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 <...
ehounder's user avatar
  • 167
2 votes
1 answer
57 views

How to constrain LocatorPane Dynamic point to a LogLogPlot line?

LocatorPane constrains to Plot[curve]: ...
ehounder's user avatar
  • 167
7 votes
1 answer
239 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 ...
blackcore's user avatar
2 votes
1 answer
107 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. ...
Suraj Parameswaran's user avatar
9 votes
1 answer
283 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 ...
B flat's user avatar
  • 5,565
7 votes
2 answers
754 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 ...
OkkesDulgerci's user avatar
3 votes
2 answers
209 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 ...
pmzhu's user avatar
  • 95
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 ...
user52941's user avatar
11 votes
3 answers
351 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 ...
Craig Carter's user avatar
  • 4,510
3 votes
1 answer
79 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 ...
user51317's user avatar
2 votes
1 answer
169 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 ...
Miladiouss's user avatar
  • 1,883
1 vote
1 answer
121 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:...
Musang's user avatar
  • 1,048
2 votes
2 answers
130 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. ...
Emily 's user avatar
  • 23
2 votes
0 answers
143 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 ...
Alexei Boulbitch's user avatar
1 vote
0 answers
151 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 ...
Igor Rivin's user avatar
  • 5,094
1 vote
1 answer
186 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 ...
Hugh's user avatar
  • 16.5k
2 votes
2 answers
275 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 ...
user6546's user avatar
  • 1,069
2 votes
2 answers
146 views

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

This is driving me nuts. Consider this Manipulate command ...
Mauricio Fernández's user avatar
1 vote
0 answers
213 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 ...
Alexei Boulbitch's user avatar
4 votes
1 answer
200 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 ...
Mauricio Fernández's user avatar
3 votes
1 answer
105 views

References in the map + References in a Locator

...
Shiro Ignis's user avatar
3 votes
1 answer
280 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 ...
Shiro Ignis's user avatar
2 votes
0 answers
86 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 ...
Eduardo's user avatar
  • 21
6 votes
1 answer
195 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 ...
msb91880's user avatar
6 votes
2 answers
625 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 ...
kornaros's user avatar
  • 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: ...
martin's user avatar
  • 8,728