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 smc.vnet.net
  • Subject: [mg127796] Re: Constraining a Location to Move Along a Plot in a Manipulate
  • From: "djmpark" <djmpark at comcast.net>
  • Date: Thu, 23 Aug 2012 02:53:03 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • 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. 

http://www.st-andrews.ac.uk/~pl10/c/djmpark/ 

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 comcast.net 
http://home.comcast.net/~djmpark/index.html 



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


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.

Regards,

Gregory




  • 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?