1
$\begingroup$

I would like to do a 3D contour plot over an implicit region, however, it seems that mma does not support the arguments within an implicit region for ContourPlot3D, is there any way to get over this? As for my problem, the region is defined as:

reg3d = ImplicitRegion[( 1+k1+k2>=0&&1-k1+k2>=0&&k2<=0&&0<=k3<=6 )||(k2>=0&&-4k2<=k1<=4 k2 &&k1^2-8k2 (1-k2)<=0&&0<=k3<=6)||(k2>=0&& 4k2<k1&&-k1+k2+1>=0&&0<=k3<=6)||(k2>=0&& -4k2>k1&&k1+k2+1>=0&&0<=k3<=6 ), { { k1, -1.5, 1.5 }, { k2, -1, 1 }, { k3, 0, 6 } } ];

which looks like:

enter image description here

and the function I would like to plot is:

gsc1[ K0_, K1_, K2_ ] := 1 - ( K0 - (K0 K1 K2)/2 );

hope some expert can give me some suggestion, thanks a lot!

$\endgroup$
  • 1
    $\begingroup$ does Show[ContourPlot3D[ gsc1[k1, k2, k3], {k1, -1.5, 1.5}, {k2, -1, 1}, {k3, 0, 6}, RegionFunction -> Function[{x, y, z}, RegionMember[reg3d][{x, y, z}]]], RegionPlot3D[reg3d, PlotStyle -> Opacity[.3]]] give what you need? $\endgroup$ – kglr Apr 7 at 5:00
  • $\begingroup$ @kglr It works, thanks a lot! $\endgroup$ – Chuan Chen Apr 8 at 1:07
2
$\begingroup$
Show[ContourPlot3D[gsc1[k1, k2, k3], {k1, -1.5, 1.5}, {k2, -1, 1}, {k3, 0, 6}, 
  PlotPoints -> 100, Mesh -> None, 
  RegionFunction -> Function[{x, y, z}, RegionMember[reg3d][{x, y, z}]]], 
 RegionPlot3D[reg3d, PlotStyle -> Opacity[.3]]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.