1

I have a function that is defined on a specific domain for example the function $$f(x,y)=(x-0.5)*(y-0.5)$$ defined on $\Sigma$ which is the circle $(x-0.5)^2+(y-0.5)^2=0.5^2$

How to plot $f$ over $\Sigma$?

I tried something like

Plot3D[(-0.5 + x) (-0.5 + y), {x, -1, 1}, {y, -1, 1}, 
RegionFunction -> 
Function[{x, y}, 0.5^2 - 0.01 <= (x - 0.5)^2 + (y - 0.5)^2 <= 0.5^2 + 0.01]]

but I am looking for something better.

Jim
  • 67
  • 7

1 Answers1

4

Try this:

Plot3D[
 (x - .5) (y - .5),                        (*  your f(x,y)       *)
 {x, 0, 1}, {y, 0, 1},
 MeshFunctions -> Function[{x, y, z},
   (x - .5)^2 + (y - .5)^2 - .5^2          (*  your Σ equation   *)
   ],
 Mesh -> {{0}},
 MeshStyle -> Red,
 PlotStyle -> None, BoundaryStyle -> None]

enter image description here

Silvia
  • 27,556
  • 3
  • 84
  • 164