5
$\begingroup$

I want to get a pictorial view of the condition (x-y)(4z^2-xy)>0. Had there been only two variables, a 3D plot would have worked, but what can one do with three variables?

$\endgroup$

2 Answers 2

7
$\begingroup$
Clear["Global`*"]

rgn = ImplicitRegion[(x - y) (4 z^2 - x*y) > 0 && -6 < x < 6 && -6 < 
     y < 6 && -6 < z < 6, {x, y, z}];

Region[rgn, Axes -> True, Boxed -> True, 
 AxesLabel -> (Style[#, 14] & /@ {x, y, z})]

enter image description here

RegionPlot3D[(x - y) (4 z^2 - x*y) > 0,
 {x, -6, 6}, {y, -6, 6}, {z, -6, 6},
 Axes -> True, Boxed -> True, 
 AxesLabel -> (Style[#, 14] & /@ {x, y, z}),
 PlotPoints -> 75]

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Yep. I also like PlotStyle ->Opacity[0.5] to better see otherwise hidden contours. $\endgroup$ Jun 8, 2023 at 23:19
5
$\begingroup$

Here we follow the suggestion by @DavidG.Stork, but only change the opacity of the boundary of the cube, not the hidden contours.

changeBoundary = 
 Insert[#, FaceForm[Directive[Opacity[.5], Cyan]], 
   Position[#, GraphicsGroup[_]] // Last] &;
RegionPlot3D[(x - y) (4 z^2 - x*y) > 0, {x, -6, 6}, {y, -6, 
  6}, {z, -6, 6}, PlotPoints -> 80, Mesh -> None, 
 ViewPoint -> {-1.8, -2.3, 1.7}] // changeBoundary

enter image description here

$\endgroup$

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