| Author |
Comment/Response |
Tom
|
02/17/08 4:38pm
I found code which creates a mouse-over 3d locater. I'd like to know how I can get it to display the x,y,z coordinates somewhere on the screen as well. The code is below:
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"])}]]
URL: , |
|