Hello Wolfram Scientists!
Do any of you know how I can crop/clip my Contour Plot 3D to fit inside an Ellipsoid? Basically, I want the result of my function to be bounded by an ellipsoid.
Thank you!
Example ina Sphere:
ContourPlot3D[x^3 + y^2 - z^2 == 0, {x, y, z} \[Element] Ball[]]
Example in PolyhedronData: https://mathematica.stackexchange.com/questions/48468/cropping-a-non-cubic-lattice-unit-cell
Ellipsoid:
a = 3; b = 2; c = 1; ContourPlot3D[x^2/a^2 + y^2/b^2 + z^2/c^2 == 1, {x, -3, 3}, {y, -3, 3}, {z, -3, 3}]
One way is to use RegionFunction:
RegionFunction
With[{a = 3, b = 2, c = 1}, ContourPlot3D[x^3 + y^2 - z^2 == 0, {x, -3, 3}, {y, -3, 3}, {z, -3, 3}, RegionFunction -> Function[{x, y, z}, x^2/a^2 + y^2/b^2 + z^2/c^2 <= 1]]]