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


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

2D Locators controlling 3D points. Have to wrap each part in Dynamic

From Chris Young <cy56@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject 2D Locators controlling 3D points. Have to wrap each part in Dynamic
Date 2012-01-21 10:13 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jfe34g$9q4$1@smc.vnet.net> (permalink)

Show all headers | View raw


Wrapping the LocatorPane and the Graphics3D in Dynamic got them
connected. I thought that DynamicModule was enough.

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

 {
  Dynamic[
   LocatorPane[
    Dynamic[pt],
    P = Append[#, 0] & /@  pt;
    Framed @ Graphics[{}, Axes -> True]
    ]
   ],

  Dynamic[
   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 | Find similar | Unroll thread


Thread

2D Locators controlling 3D points. Have to wrap each part in Dynamic Chris Young <cy56@comcast.net> - 2012-01-21 10:13 +0000

csiph-web