0
$\begingroup$

I am trying to demonstrate how the convex hull for my function and using the following formula for that (where the first inequality is the original function, and the second one is its convexified version):

RegionPlot3D[{(2 v1 v2 v3)/(v1 v2 + v2 v3 + v1 v3) < v3, 0.75 v1 + 0.75 v2 - 2.25 v3 - 1.125 < 0}, {v1, 1, 3}, {v2, 1, 3}, {v3, 1, 3}, ViewPoint -> {2, 1.0, -1.1}, BoundaryStyle -> Directive[Black], MeshFunctions -> {#3 &  }]

The result looks as follows:

enter image description here

Note that the "left" intersection of the set is highlighted with orange, while the "right" one is highlighted with blue. It is possible somehow to prioritize the color of the first function for the intersections, i.e., the only blue part would be the triangle "at the bottom"?

$\endgroup$

1 Answer 1

2
$\begingroup$
Clear[reg, reg1];
reg = ImplicitRegion[(2 v1 v2 v3)/(v1 v2 + v2 v3 + v1 v3) < 
    v3, {{v1, 1, 3}, {v2, 1, 3}, {v3, 1, 3}}];
reg1 = RegionDifference[ConvexHullRegion[reg], reg];
Show[RegionPlot3D[reg, MeshFunctions -> {#3 &}, Mesh -> Automatic], 
 Region[Style[reg1, Blue]], ViewPoint -> {2, 1.0, -1.1}, 
 Boxed -> False]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you very much! $\endgroup$
    – Oleh
    Commented Jul 29, 2022 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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