Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

RE: Re: Locator 3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83547] RE: [mg83508] Re: Locator 3D
  • From: "Ingolf Dahl" <ingolf.dahl at telia.com>
  • Date: Thu, 22 Nov 2007 04:59:19 -0500 (EST)
  • References: <fi0ndv$5c5$1@smc.vnet.net> <200711211059.FAA13110@smc.vnet.net> <001301c82c47$c1adc470$996f1081@fy.chalmers.se> <f831b3d60711210806m4dc9d06egb35b5e260b60b50c@mail.gmail.com>

A really nice proof-of-principle! Now it is "just" remains to generalize to
a arbitrary function and arbitrary scales on the axes, add a coordinate
read-out, and wrap it up in the appropriate way. Maybe the FindRoot routine
could be instructed to always search for that solution, which is in front in
the image. Maybe one could also have another "slave" display, from another
perspective. I tried with the function

fun[x_, y_] := Sin[x*Pi]*Sin[y*Pi]

and then is sometimes seems to me as if a background solution is found,
since the sphere disappear.

The ball is passed...

Ingolf Dahl

> -----Original Message-----
> From: Szabolcs Horv=E1t [mailto:szhorvat at gmail.com]
> Sent: den 21 november 2007 17:06
> To: ingolf.dahl at telia.com
> Cc: roby.nowak at gmail.com; mathgroup at smc.vnet.net
> Subject: Re: [mg83508] Re: Locator 3D
>
> Here's a semi-working example for moving a point on a 3D surface:
>
> fun[x_, y_] := x^2 + y^2
>
> DynamicModule[{f, b}, EventHandler[
>   Show[Plot3D[fun[x, y], {x, -1, 1}, {y, -1, 1}],
>    Graphics3D[
>     Dynamic@Quiet@
>       Check[Sphere[((f - b) t + f) /.
>          FindRoot[
>           fun[#1, #2] == #3 & @@ ((f - b) t + f), {t, 0}], .1], {}]],
>    BoxRatios -> {1, 1, 1}],
>   {"MouseMoved" :> ({f, b} =
>       MousePosition["Graphics3DBoxIntercepts"])}]]
>
> Note that sometimes the intersection of the line and surface
> that is found by FindRoot[] is outside the visible area.
>
> Szabolcs
>
> On Nov 21, 2007 3:06 PM, Ingolf Dahl <ingolf.dahl at telia.com> wrote:
> > One could also think of locators with "object snap", in such a way
> > that the movement in the 3D case is confined to some
> graphic elements
> > (points, lines or surfaces), present in the 3D graphics.
> The movement
> > of the locator can then be controlled by the 2D position of
> the mouse
> > in the image plane. But I do not know how to implement that in
> > Mathematica in a good way. One could maybe imagine working on a
> > freezed(=fixed viewpoint) 2D projection of the 3D image,
> with ordinary
> > 2D locators, and then search the graphics for 3D objects
> with 2D projections in the neighborhood of the locator positions.
> > Another possibility is to have two freezed 2D projections from
> > different directions, with a common list of 3D locators, coupled to
> > the 2D locators of the two projections.
> > A third possibility is to use the mouse wheel, available on
> many mice.
> > But how to see where the locator is in the depth direction?
> > With all the clever programmers following MathGroup, maybe
> someone...
> >
> > Best regards
> >
> > Ingolf Dahl
> >
> > -----Original Message-----
> > From: Szabolcs Horv=E1t [mailto:szhorvat at gmail.com]
> > Sent: 21 November 2007 12:00
> > To: mathgroup at smc.vnet.net
> > Subject: [mg83508] Re: Locator 3D
> >
> > roby.nowak at gmail.com wrote:
> > > Hi everybody,
> > >
> > > is there something like a 3D Locator in Mathematica 6.0 ?
> > > how could such a thing be realised ?
> >
> > The advantage of a Locator over something like
> >
> > Manipulate[
> >   Graphics[Point[{x, y}], PlotRange -> 1],
> >   {x, -1, 1}, {y, -1, 1}]
> >
> > is that it can be directly moved with the mouse.  To easily move a
> > point in 3D, one needs a special input device.  If you do
> have such a
> > device, then you might want to look at the documentation page
> > guide/GamepadAndDeviceInterface .  It should be possible to
> use it to
> > move a point in 3D, but I never had the chance to try this
> because I
> > do not have access to game pads.
> >
> > --
> > Szabolcs
> >
> >
> >
> >
>




  • References:
  • Prev by Date: Re: Re: Fast way of checking for perfect squares?
  • Next by Date: Re: Neural networks with mathematica
  • Previous by thread: RE: Re: Locator 3D
  • Next by thread: Re: Locator 3D