LiveGraphics3D Example:
A Tangent Plane



An Interactive Tangent Plane to a Paraboloid

This is a parametrized tangent plane through a point of a paraboloid, which can be manipulated by dragging the red dot.

The construction within Mathematica is given below. (It uses the function LiveForm from the documentation). Of course, it is possible to do this in a more elegant way. :-) Some notes: I used three red dots (slightly shifted along the z-axis) such that at least one is almost always visible. (The "1.*"s avoid that the second and third point may be dragged, because only points with coordinates that are independent variables (without any further expressions) may be dragged.) The rules for x and y in the dependentVariables list guarantee that x and y stay within the -5 to 5 interval. I couldn't use Plot3D because it does not like symbolic expressions. The movements of the dragged point is counter-intuitive because the mouse movement is projected to a plane parallel to the xy-plane and then projected to the paraboloid. If z is defined as independent variables the projection to the xy-plane is avoided and the movements get a little more intuitive, on the other hand it is counter-intuitive to declare z as an independent variable when it really depends on x and y. Also note, that the colors of the plane are not recalculated. Well, if I had time, I would implement this recalculation...

independentVariables = {x -> 2, y -> 2};
dependentVariables = {x -> If[x < -5, -5, 
     If[x > 5, 5, x]], 
  y -> If[y < -5, -5, If[y > 5, 5, y]], 
  z -> x*x + y*y};
minx = -5; miny = -5; maxx = 5; maxy = 5;
n = 10; dx = (maxx - minx)/n; dy = (maxy - miny)/n;
point = {PointSize[0.04], RGBColor[1, 0, 0], 
   Point[{x, y, z}], Point[{1.*x, 1.*y, z + 2}], 
   Point[{1.*x, 1.*y, z - 2}]};
paraboloid = Table[Polygon[{{i, j, i*i + j*j}, 
   {i + dx, j, (i + dx)*(i + dx) + j*j}, 
   {i + dx, j + dy, (i + dx)*(i + dx) + (j + dy)*(j + dy)}, 
   {i, j + dy, i*i + (j + dy)*(j + dy)}}], 
   {i, minx, maxx - dx/2, dx}, {j, miny, maxy - dy/2, dy}];
plane = Table[Polygon[{{i, j, (i - x)*2*x + (j - y)*2*y + z}, 
   {i + dx, j, (i + dx - x)*2*x + (j - y)*2*y + z}, 
   {i + dx, j + dy, (i + dx - x)*2*x + (j + dy - y)*2*y + z}, 
   {i, j + dy, (i - x)*2*x + (j + dy - y)*2*y + z}}], 
   {i, minx, maxx - dx/2, dx}, {j, miny, maxy - dy/2, dy}];
LiveForm[graphics]
The returned Graphics3D object was used as value for the INPUT parameter of the applet. Also, the INDEPENDENT_VARIABLES and DEPENDENT_VARIABLES parameters have to be set:
<PARAM NAME="INDEPENDENT_VARIABLES" VALUE="{x -> 2, y -> 2}">
<PARAM NAME="DEPENDENT_VARIABLES" VALUE="{x -> If[x < -5, -5, If[x > 5, 5, x]], 
  y -> If[y < -5, -5, If[y > 5, 5, y]], 
  z -> x*x + y*y}">



Martin Kraus, February 13th, 2003