1
$\begingroup$
reg1 := ImplicitRegion[ x > 10 && y > 20 && z > 20, {{x, 0, 30}, {y, 10, 50}, {z, 10, 30}}]
reg2 := ImplicitRegion[x > 10 && y > 20 && z == 12, {{x, 0, 30}, {y, 10, 50}, {z, 10, 30}}]
reg3 := ImplicitRegion[x > 10 && y == 15 && z == 15, {{x, 0, 30}, {y, 10, 50}, {z, 10, 30}}]

Grid[Map[{Show[#]} &, {{RegionPlot3D[reg1], RegionPlot3D[reg2], 
RegionPlot3D[reg3]}, {DiscretizeRegion[reg1], 
DiscretizeRegion[reg2], DiscretizeRegion[reg3]}}], Frame -> All]

In the above code, when using RegionPlot3D, the line is not displayed. I tried increasing plotpoints and adding plotrange, still no change

Show[{RegionPlot3D[reg1], RegionPlot3D[reg2], 
RegionPlot3D[reg3]}, PlotPoints -> 70, PlotRange -> All]
$\endgroup$
  • $\begingroup$ PlotPoints is not an option for Show, so it will have no influence here at all. $\endgroup$ – Yves Klett Feb 1 '16 at 8:43
1
$\begingroup$

You need to give the line some thickness in either the y or z dimension (or both) to be able to see it.

d = .05;

reg1 = ImplicitRegion[x > 10 && y > 20 && z > 20,
   {{x, 0, 30}, {y, 10, 50}, {z, 10, 30}}];
reg2 = ImplicitRegion[x > 10 && y > 20 && z == 12,
   {{x, 0, 30}, {y, 10, 50}, {z, 10, 30}}];
reg3 = ImplicitRegion[x > 10 && 15 - d < y < 15 + d && z == 15,
   {{x, 0, 30}, {y, 10, 50}, {z, 10, 30}}];

RegionPlot3D[{reg1, reg2, reg3}]

enter image description here

reg1 = ImplicitRegion[x > 10 && y > 20 && z > 20,
   {{x, 0, 30}, {y, 10, 50}, {z, 10, 30}}];
reg2 = ImplicitRegion[x > 10 && y > 20 && z == 12,
   {{x, 0, 30}, {y, 10, 50}, {z, 10, 30}}];
reg3 = ImplicitRegion[x > 10 && y == 15 && 15 - d < z < 15 + d,
   {{x, 0, 30}, {y, 10, 50}, {z, 10, 30}}];

RegionPlot3D[{reg1, reg2, reg3}]

enter image description here

$\endgroup$
  • $\begingroup$ thnx..Do you know why this is happening? It works fine if the line is plotted separately. I want to plot implicit regions and it is not always easy to identify lines and add thickness to it. $\endgroup$ – Prashanth Feb 1 '16 at 6:39
  • $\begingroup$ @Prashanth "RegionPlot3D can in general only find regions of positive measure; it cannot find regions that are just lines or points. " I guess it should actually say that it only supports regions of positive volume measure. The algorithm cannot detect regions defined by equalities. $\endgroup$ – masterxilo Sep 18 '16 at 14:26

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.