MathGroup Archive 2012

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

Search the Archive

Re: DynamicModule to set locations of 3D points from 2D LocatorPane?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124522] Re: DynamicModule to set locations of 3D points from 2D LocatorPane?
  • From: David Reiss <dbreiss at gmail.com>
  • Date: Sun, 22 Jan 2012 07:26:44 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jfe32d$9pa$1@smc.vnet.net>

In your DynamicModule, P is not being dynamically updated anywhere,
nor is the 3D graphic.  Try this as a possibility that works:


DynamicModule[{pt = 1/2 {{1, 1}, {-1, 1}, {1, -1}}, P},

 {LocatorPane[Dynamic[pt],

   Framed@Graphics[{}, Axes -> True]],


  Dynamic[
   P = Append[#, 0] & /@ pt;
   Graphics3D[{Sphere[P, 0.05], {Opacity[0.5], Tube[Line[P], 0.03]},
     Tube[BezierCurve[P], .03]}, Axes -> True, PlotRange -> 1]
   ],

  Dynamic[pt], Dynamic[P]}]



--David


On Jan 21, 5:12 am, Chris Young <c... at comcast.net> wrote:
> I don't see why the following doesn't update the 3D points. They just
> stay stuck at the initialized x and y coordinates.
>
> DynamicModule[
>  {pt = 1/2 {{1, 1}, {-1, 1}, {1, -1}},
>   P},
>
>  {
>   LocatorPane[
>    Dynamic[pt],
>    P = Append[#, 0] & /@  pt;
>    Framed @ Graphics[{}, Axes -> True]
>    ],
>
>   Graphics3D[
>    {
>     Sphere[P, 0.05],
>     {Opacity[0.5], Tube[Line[P], 0.03]},
>     Tube[BezierCurve[P], .03]
>     },
>    Axes -> True,
>    PlotRange -> 1
>    ],
>
>   Dynamic[pt],
>   Dynamic[P]
>   }
>  ]




  • Prev by Date: Re: select 1st column element based on criteria in 2nd AND 3rd column
  • Next by Date: Re: MatrixForm odd behaviour
  • Previous by thread: DynamicModule to set locations of 3D points from 2D LocatorPane?
  • Next by thread: Re: DynamicModule to set locations of 3D points from 2D LocatorPane?