Bound surface limits to a function

Bound surface limits to a function



Consider the following plot of two surfaces


Plot3D[Sin[x y], x^3 + y, x, -1, 1, y, -1, 1, PlotRange -> x, -1, 1, y, -1, 1, z, -1, 1, Mesh -> None]



plot



How can I produce a plot where I limit the the surface plot of $sin(x y)$, to be shown only when its values are above $x^3+y$, or any other given function.




2 Answers
2


Plot3D[ConditionalExpression[Sin[x y], Sin[x y] > x^3 + y],
x, -1, 1, y, -1, 1, PlotRange -> -1, 1, -1, 1, -1, 1, Mesh -> None]



enter image description here



To show both functions


Plot3D[ConditionalExpression[Sin[x y], Sin[x y] > x^3 + y], x^3 + y ,
x, -1, 1, y, -1, 1, PlotRange -> -1, 1, -1, 1, -1, 1,
Mesh -> None, BaseStyle -> Opacity[.7]]



enter image description here


Plot3D[Sin[x y], x, -1, 1, y, -1, 1,
 PlotRange -> -1, 1, -1, 1, -1, 1,
MeshFunctions -> Sin[# #2] - #^3 - #2 &, Mesh -> 0,
MeshShading -> None, Automatic, BoundaryStyle -> None]



enter image description here



You can utilize the option RegionFunction for that:


RegionFunction


Plot3D[Sin[x y], x^3 + y, x, -1, 1, y, -1, 1,
Mesh -> None,
RegionFunction -> (x, y, z [Function] Sin[x y] > (x^3 + y))
]



enter image description here





Equivalently: reg = BoundaryDiscretizeRegion[ImplicitRegion[Sin[x y] > (x^3 + y), x, -1, 1, y, -1, 1]]; Plot3D[Sin[x y], x, y ∈ reg]
– J. M. is computer-less
Oct 6 at 9:59


reg = BoundaryDiscretizeRegion[ImplicitRegion[Sin[x y] > (x^3 + y), x, -1, 1, y, -1, 1]]; Plot3D[Sin[x y], x, y ∈ reg]



Required, but never shown



Required, but never shown






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)