2
$\begingroup$

Why doesn't this RegionPlot3D not plot anything?

RegionPlot3D[ 0 < Subscript[y, 1] < 1 && Subscript[y, 2] == 0 && Subscript[y, 3] == 1 - Subscript[y, 1] && Subscript[x, 1] == 1 && Subscript[x, 2] == 0 && Subscript[x, 3] == 0, {Subscript[y, 1], 0, 1}, {Subscript[y, 2], 0, 1}, {Subscript[y, 3], 0, 1}]

The result I would expect would be this one:

RegionPlot3D[ 0 < Subscript[y, 1] < 1 && Subscript[y, 2] == 0 && Subscript[y, 3] == 1 - Subscript[y, 1], {Subscript[y, 1], 0, 1}, {Subscript[y, 2], 0, 1}, {Subscript[y, 3], 0, 1}]

I have much more complicated expressions than this, where the common theme is that there will be 3 free variables which I specify where to plot (here, $y_1, y_2, y_3$) and all other variables will be given, like above (e.g., $x_1, x_2, x_3$ here) and I want to plot the resulting region. Is there a correct way of doing this?

$\endgroup$
1
  • $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$
    – bbgodfrey
    Commented Nov 14, 2021 at 22:18

1 Answer 1

2
$\begingroup$
contrains = 
  0 < y[1] < 1 && y[2] == 0 && y[3] == 1 - y[1] && x[1] == 1 && 
   x[2] == 0 && x[3] == 0;
reg = ParametricRegion[{{y[1], y[2], y[3]}, 
    contrains}, {{y[1], 0, 1}, {y[2], 0, 1}, {y[3], 0, 1}, x[1], x[2],
     x[3]}];
DiscretizeRegion[reg, Boxed -> True]
Region[Style[reg, Thick, Blue], Boxed -> True]

enter image description here

$\endgroup$
2
  • $\begingroup$ Is there really no way to use RegionPlot3D? I wanted its features, like the labels and all, or other future necessary things. Region seems to be very general, though. $\endgroup$
    – Jay
    Commented Nov 15, 2021 at 6:10
  • $\begingroup$ @Jay Up to the 12.3.1 version, RegionPlot3D still can't draw such equations. We can use label in Region or use Show to add another objects in such figure. $\endgroup$
    – cvgmt
    Commented Nov 15, 2021 at 6:57

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.