MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Constraining a Location to Move Along a Plot in a Manipulate

  • To: mathgroup at
  • Subject: [mg127796] Re: Constraining a Location to Move Along a Plot in a Manipulate
  • From: "djmpark" <djmpark at>
  • Date: Thu, 23 Aug 2012 02:53:03 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <17693491.188885.1345512738836.JavaMail.root@m06>

Assuming you really do want a Locator constrained to an adjustable line I
have prepared a notebook and PDF file that should appear in a day or so on
the archive site that Peter Lindsay at the St. Andrew Mathematics department
keeps for me. 

It allows a line segment to be repositioned and oriented with two locators.
A third locator then moves the point along the line. The line is
parameterized to go from the first to the second point as the parameter is
varied from 0 to 1. When the line is repositioned the third point maintains
its parametric position. When the third locator is moved, it is constrained
to the line, and its parameter is recalculated and displayed.

John Browne's GrassmannAlgebra Application was used to perform the
calculations for the dynamic display.

David Park
djmpark at 

From: Gregory Lypny [mailto:gregory.lypny at] 

Hello everyone,

Awhile back, participants on this forum kindly showed me how to constrain a
locator to move along a curve by using DynamicModule[...], an example of
which is in the Help Centre.  But I can't figure out how to pull this off in
a Manipulate,where I'm guessing that the locator would be a control.  Say I
have a simple Manipulate that plots a line, y = mx + b, where m is control
for changing the slope.  I would also like to have a locator that users can
slide up and down the line in lieu of a slider control that draws a point on
the line.



  • Prev by Date: NDSolve: Transmissive boundary conditions?
  • Next by Date: Re: Non-sequential composition of pure functions
  • Previous by thread: Re: Constraining a Location to Move Along a Plot in a
  • Next by thread: trouble with NDSolve: how to diagnose a problem with initial conditions?