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


Groups > comp.soft-sys.math.mathematica > #8091

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

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!newspump.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail
From David Reiss <dbreiss@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: DynamicModule to set locations of 3D points from 2D LocatorPane?
Date Sun, 22 Jan 2012 12:31:18 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <jfgvim$pln$1@smc.vnet.net> (permalink)
References <jfe32d$9pa$1@smc.vnet.net>
Lines 55
NNTP-Posting-Date 22 Jan 2012 12:31:48 GMT
NNTP-Posting-Host 00efdc36.news.twtelecom.net
X-Trace DXC=bR6eH9_4h51B8ck_2OIRd8C_A=>8kQj6=hHXa^^g6TZ4dNI14e3PWd?EFiONJ7[Go6_OYS>dlfP59
X-Complaints-To abuse@twtelecom.net
Xref x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:8091

Show key headers only | View raw


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...@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]
>   }
>  ]

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

DynamicModule to set locations of 3D points from 2D LocatorPane? Chris Young <cy56@comcast.net> - 2012-01-21 10:12 +0000
  Re: DynamicModule to set locations of 3D points from 2D LocatorPane? "Nasser M. Abbasi" <nma@12000.org> - 2012-01-22 12:30 +0000
  Re: DynamicModule to set locations of 3D points from 2D LocatorPane? David Reiss <dbreiss@gmail.com> - 2012-01-22 12:31 +0000
    Re: DynamicModule to set locations of 3D points from 2D LocatorPane? Chris Young <cy56@comcast.net> - 2012-01-23 08:00 +0000

csiph-web