Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Mapping a curve to a surface using Manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124617] Re: Mapping a curve to a surface using Manipulate
  • From: Christopher Young <cy56 at comcast.net>
  • Date: Fri, 27 Jan 2012 06:07:00 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201212591140.813935@jfultz3winlap>

Thanks very much, that allows me to rotate the 3D graph and resize it, 
without the clicks being captured by the LocatorPane. It looks like the 
problem of the clicks getting captured was due to their being two sets 
of locators, one created by the LocatorPane declaration, and the other 
by the manipulate listing of points. Taking out the "Locator" and 
replacing it with "None" fixed this.

It's interesting to remove each Dynamic call one at a time and to see 
the effect. Everything basically works if I just remove the Dynamic 
wrapper for the 3D plotting. The only problem is that dragging will only 
go a little way at a time. Everything is vastly slowed down. Can this be 
understood as the Manipulator sending many more events to the 
Show[ParametricPlot3D[=85]] unless the Dynamic is applied to "fence it 
off"? 

At any rate, working through these examples with this kind of assistance 
is a big help.

Chris


On Jan 25, 2012, at 10:11 AM, John Fultz wrote:

> The Manipulate Locator control always creates a LocatorPane that covers the
> entire Manipulate contents.  If you want different behavior, you'll have to
> introduce your own LocatorPane to the Manipulate.  However, you don't want to
> run into problems we've discussed previously with controls being recreated
> inside of a Dynamic (in this case, the implicit Dynamic introduced by
> Manipulate) as you're using them.  So, a couple of strategically placed Dynamics
> to prevent this are necessary as well.  See if this works for you:
>
> Manipulate[
> Grid[{{LocatorPane[Dynamic[P],
>     Dynamic@Show[
>       ParametricPlot[\[HorizontalLine]Bez[P, t], {t, 0, 1}],
>       Graphics@{Dotted, Line[P]}, PlotRange -> 2, Axes -> True]],
>    Dynamic@Show[
>      ParametricPlot3D[{u, v, u v}, {u, -2, 2}, {v, -2, 2},
>       PlotRange -> 2, Mesh -> False],
>      ParametricPlot3D[{\[HorizontalLine]Bez[P,
>           t][[1]], \[HorizontalLine]Bez[P,
>           t][[2]], \[HorizontalLine]Bez[P,
>            t][[1]] \[HorizontalLine]Bez[P, t][[2]]}, {t, 0, 1},
>        PlotRange -> 2] /.
>       Line[pts_, rest___] :>
>        Tube[pts, 0.05, rest]]}}], {{P, {{-1, -1}, {-1, -.5}, {-1,
>     0}, {-1, .5}, {-1, 1}, {1, -1}, {1, -.5}, {1, 0}, {1, .5}, {1,
>     1}}}, None}, {{n, 10}, 0, 50, 1}]







  • Prev by Date: Re: Puzzled by Sum
  • Next by Date: Re: Probability
  • Previous by thread: Re: Mapping a curve to a surface using Manipulate
  • Next by thread: Re: Mapping a curve to a surface using Manipulate