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 <ingol...@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át [mailto:szho...@gmail.com]

> Sent: 21 November 2007 12:00

> To: math...@smc.vnet.net

> Subject: Re: Locator 3D

>

> roby....@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

>

>

>

>