Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8207 > unrolled thread

Re: Mapping a curve to a surface using Manipulate

Started byChristopher Young <cy56@comcast.net>
First post2012-01-27 11:07 +0000
Last post2012-01-27 11:07 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Mapping a curve to a surface using Manipulate Christopher Young <cy56@comcast.net> - 2012-01-27 11:07 +0000

#8207 — Re: Mapping a curve to a surface using Manipulate

FromChristopher Young <cy56@comcast.net>
Date2012-01-27 11:07 +0000
SubjectRe: Mapping a curve to a surface using Manipulate
Message-ID<jfu0hm$c2j$1@smc.vnet.net>
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}]




[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web