Skip to main content
Fixed typo
Source Link
Michael E2
  • 244.8k
  • 18
  • 351
  • 774

To answer @cvgmt's comment, I would point out this image/animation works because the surface is of the form $z=a-bx^2-cy^2$$z=a-bx^2-by^2$. This implies the vertices of the tangent plane segments over squares coincide at the same height above the surface at every vertex.

Manipulate[
 Show[
  
  ListPlot3D[
   Table[4 - x^2 - y^2 + 2/n^2, {x, -1, 1, 2/n}, {y, -1, 1, 2/n}],
   NormalsFunction -> None, Mesh -> 2 n - 1, 
   MeshShading -> 
    Flatten[Table[{{1, 1}, {1, 1}} RGBColor[j/n, k/n, 0, 2/3], {j, 
       n}, {k, n}], {{1, 3}, {2, 4}}], 
   DataRange -> {{-1, 1}, {-1, 1}}],
  
  Plot3D[4 - x^2 - y^2, {x, -1, 1}, {y, -1, 1}, 
   PlotStyle -> LightBlue, Mesh -> 2 n - 1],
  
  Plot3D[0, {x, -1, 1}, {y, -1, 1},
   Mesh -> Max[n - 1, 1], 
   MeshShading -> Table[RGBColor[j/n, k/n, 0], {j, n}, {k, n}], 
   PlotStyle -> RGBColor[1/2, 1/2, 0]],
  BoxRatios -> {1, 1, 3/2}, PlotRange -> {{-1, 1}, {-1, 1}, {0, 4.5}},
   Lighting -> "Neutral"
  ],
 
 {n, 1, 10, 1}
 ]

To answer @cvgmt's comment, I would point out this image/animation works because the surface is of the form $z=a-bx^2-cy^2$. This implies the vertices of the tangent plane segments over squares coincide at the same height above the surface at every vertex.

Manipulate[
 Show[
  
  ListPlot3D[
   Table[4 - x^2 - y^2 + 2/n^2, {x, -1, 1, 2/n}, {y, -1, 1, 2/n}],
   NormalsFunction -> None, Mesh -> 2 n - 1, 
   MeshShading -> 
    Flatten[Table[{{1, 1}, {1, 1}} RGBColor[j/n, k/n, 0, 2/3], {j, 
       n}, {k, n}], {{1, 3}, {2, 4}}], 
   DataRange -> {{-1, 1}, {-1, 1}}],
  
  Plot3D[4 - x^2 - y^2, {x, -1, 1}, {y, -1, 1}, 
   PlotStyle -> LightBlue, Mesh -> 2 n - 1],
  
  Plot3D[0, {x, -1, 1}, {y, -1, 1},
   Mesh -> Max[n - 1, 1], 
   MeshShading -> Table[RGBColor[j/n, k/n, 0], {j, n}, {k, n}], 
   PlotStyle -> RGBColor[1/2, 1/2, 0]],
  BoxRatios -> {1, 1, 3/2}, PlotRange -> {{-1, 1}, {-1, 1}, {0, 4.5}},
   Lighting -> "Neutral"
  ],
 
 {n, 1, 10, 1}
 ]

To answer @cvgmt's comment, I would point out this image/animation works because the surface is of the form $z=a-bx^2-by^2$. This implies the vertices of the tangent plane segments over squares coincide at the same height above the surface at every vertex.

Manipulate[
 Show[
  
  ListPlot3D[
   Table[4 - x^2 - y^2 + 2/n^2, {x, -1, 1, 2/n}, {y, -1, 1, 2/n}],
   NormalsFunction -> None, Mesh -> 2 n - 1, 
   MeshShading -> 
    Flatten[Table[{{1, 1}, {1, 1}} RGBColor[j/n, k/n, 0, 2/3], {j, 
       n}, {k, n}], {{1, 3}, {2, 4}}], 
   DataRange -> {{-1, 1}, {-1, 1}}],
  
  Plot3D[4 - x^2 - y^2, {x, -1, 1}, {y, -1, 1}, 
   PlotStyle -> LightBlue, Mesh -> 2 n - 1],
  
  Plot3D[0, {x, -1, 1}, {y, -1, 1},
   Mesh -> Max[n - 1, 1], 
   MeshShading -> Table[RGBColor[j/n, k/n, 0], {j, n}, {k, n}], 
   PlotStyle -> RGBColor[1/2, 1/2, 0]],
  BoxRatios -> {1, 1, 3/2}, PlotRange -> {{-1, 1}, {-1, 1}, {0, 4.5}},
   Lighting -> "Neutral"
  ],
 
 {n, 1, 10, 1}
 ]
Source Link
Michael E2
  • 244.8k
  • 18
  • 351
  • 774

To answer @cvgmt's comment, I would point out this image/animation works because the surface is of the form $z=a-bx^2-cy^2$. This implies the vertices of the tangent plane segments over squares coincide at the same height above the surface at every vertex.

Manipulate[
 Show[
  
  ListPlot3D[
   Table[4 - x^2 - y^2 + 2/n^2, {x, -1, 1, 2/n}, {y, -1, 1, 2/n}],
   NormalsFunction -> None, Mesh -> 2 n - 1, 
   MeshShading -> 
    Flatten[Table[{{1, 1}, {1, 1}} RGBColor[j/n, k/n, 0, 2/3], {j, 
       n}, {k, n}], {{1, 3}, {2, 4}}], 
   DataRange -> {{-1, 1}, {-1, 1}}],
  
  Plot3D[4 - x^2 - y^2, {x, -1, 1}, {y, -1, 1}, 
   PlotStyle -> LightBlue, Mesh -> 2 n - 1],
  
  Plot3D[0, {x, -1, 1}, {y, -1, 1},
   Mesh -> Max[n - 1, 1], 
   MeshShading -> Table[RGBColor[j/n, k/n, 0], {j, n}, {k, n}], 
   PlotStyle -> RGBColor[1/2, 1/2, 0]],
  BoxRatios -> {1, 1, 3/2}, PlotRange -> {{-1, 1}, {-1, 1}, {0, 4.5}},
   Lighting -> "Neutral"
  ],
 
 {n, 1, 10, 1}
 ]