MathGroup Archive 2008

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

Search the Archive

Re: Dynamic tangential plane - how?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92919] Re: Dynamic tangential plane - how?
  • From: Januk <ggroup at sarj.ca>
  • Date: Sun, 19 Oct 2008 05:41:16 -0400 (EDT)
  • References: <gdcdh5$fkf$1@smc.vnet.net>

Are you sure you're not seeing the range change and mistaking that for
the f[x,y] changing?  Try restricting the PlotRange and using a Show
command:

DynamicModule[{a = 1, b = 1, p, q, punkt},
 {
  Slider2D[Dynamic[{a, b}], {{-2, -2}, {2, 2}}],
  Dynamic[
   q = Show[
     Plot3D[{
       f[x, y],
       f[a, b] + grad[a, b].{x - a, y - b}
       }, {x, -2, 2}, {y, -2, 2}
      ],
     Graphics3D[{
       PointSize[Large], Red,
       Point[{a, b, f[a, b]}]
       }],
     PlotRange -> {All, All, {-10, 10}}
     ]
   ]
  }
 ]

Good luck!
Januk


On Oct 18, 6:24 am, "m.g." <m... at michaelgamer.de> wrote:
> Hello Group,
>
>   I=B4m trying to visualize the tangential plane to a function f(x,y)=
. I
> =B4ve done various attemps -  none of them was successfull. Here an
> extract of my attempts:
>
> f[x_, y_] := (1 - x^2) (2 x - y^3)
> grad[x_, y_] := {2 (1 - x^2) - 2 x (2 x - y^3), -3 (1 - x^2) y^2}
>
> DynamicModule[{a = 1, b = 1, p, q, punkt},
>  {Slider2D[Dynamic[{a, b}], {{-2, -2}, {2, 2}}],
>   p = Plot3D[f[x, y], {x, -2, 2}, {y, -2, 2}],
>   punkt = Dynamic @ Graphics3D[{PointSize[Large], Red, Point[{a, b,
> f[a, b]}]}],
>   q = Dynamic @ Plot3D[f[a, b] + grad[a, b].{x - a, y - b}, {x, -2,
> 2}, {y, -2, 2}]
>   }
>  ]
>
> Here the three parts I need (the surface of f, the tangential plane
> and the point "punkt" where the plane touches the surface) are shown,
> side by side.How can I manage it, that this three graphics are put
> together in ONE Graphics.
>
> The attempt
>
> DynamicModule[{a = 1, b = 1, p, q, punkt},
>  {Slider2D[Dynamic[{a, b}], {{-2, -2}, {2, 2}}],
>   punkt = Dynamic @ Graphics3D[{PointSize[Large], Red, Point[{a, b,
> f[a, b]}]}],
>   q = Dynamic @ Plot3D[{f[x, y], f[a, b] + grad[a, b].{x - a, y - b}}=
,
> {x, -2, 2}, {y, -2, 2}]
>   }
>  ]
>
> Changes f[x,y] (!!!), but only a and b are dynamically changing. How
> could this happen??
>
> Any hints appreciated.
>
> Greeting from Germany
>
> Mike



  • Prev by Date: Re: Import["http://.."] wackiness.... ?
  • Next by Date: Re: Dynamic tangential plane - how?
  • Previous by thread: Re: Dynamic tangential plane - how?
  • Next by thread: Re: Dynamic tangential plane - how?