Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

when working with 2D, RegionPlot works fine with ParametricRegion as can be seen in this example:

r = ParametricRegion[{Cos[t], Sin[t]}, {{t, 0, 2 Pi}}];
RegionPlot[r]

however, when working with 3D ParametricRegion, the RegionPlot3D run forever. check this example:

r2 = ParametricRegion[{Cos[u], Sin[u] + Cos[v], 
    Sin[v]}, {{u, 0, 2 Pi}, {v, -Pi, Pi}}];
    RegionPlot3D[r2]

nothing in the documentation said about functions ParametricRegion and RegionPlot3D that they should not be use for 3D parametric Region.

any explanation why RegionPlot3D run non stop when plotting r2?

MMA 10 on windows 8.

thanks

share|improve this question
    
what do you mean by RegionPlot[r2] is valid? in general, r2 is a valid region because you can do other operations with r2 such as RegionDistance and also RegionQ[r2] is True. –  Algohi Aug 17 at 23:55
    
you can create ParametricRegion of any 3D paramedic function and then try to plot it using RegionPlot3D. –  Algohi Aug 18 at 0:02
    
I did not find any such thing in the docs. but even if the operation is not valid, I should have got and error message. –  Algohi Aug 18 at 0:06
    
OK, I was just wondering. I know RegionPlot3D works on ImplicitRegion[x^2 + y^2 + z^2 <= 1, {x, y, z}], but being undocumented suggests there may be limitations. I thought maybe you had seen an example. Perhaps someone will enlighten us. –  Michael E2 Aug 18 at 0:11

1 Answer 1

First, I should say that I could find no examples of using RegionPlot3D with regions in the documentation. It works on some regions, not on others, and in this case runs longer than one wants to wait.

It runs nonstop because

Reduce[Exists[{u, v},
  x - Cos[u] == 0 && y - Cos[v] - Sin[u] == 0 &&  z - Sin[v] == 0 &&
   0 <= u <= 2*Pi && -Pi <= v <= Pi],
 {x, y, z}, Reals]

runs nonstop. RegionPlot3D makes a call to Reduce like the above.

How to find the Reduce call:

r2 = ParametricRegion[{Cos[u], Sin[u] + Cos[v], Sin[v]}, {{u, 0, 2 Pi}, {v, -Pi, Pi}}]

foo = Trace[
   TimeConstrained[RegionPlot3D[r2], 1],
   TraceInternal -> True];

Cases[foo, r_Reduce :> HoldForm[r], Infinity]

The output will produce a similar Reduce call with local variables in the Region`Private` context instead of u, v, x, y, and z.


A potential issue, should Reduce ever return something useful, is that the ParametricRegion r2 is a surface in space:

RegionDimension[r2]
(* 2 *)

RegionEmbeddingDimension[r2]
(* 3 *)

RegionPlot3D plots a solid region by showing its surface. It's not clear to me that it would work with an input that is a surface and not a description of a solid region.

DiscretizeRegion[r2] might work, but it makes the same call to Reduce as RegionPlot3D.

Another issue is that the "inside" of r2 is not well-defined. Below we see the surface intersects itself and the inside becomes the outside, so to speak, shown by the coloring due to FaceForm.

ParametricPlot3D[{Cos[u], Sin[u] + Cos[v], Sin[v]},
 {u, 0, 2 Pi}, {v, -Pi, Pi}, 
 PlotStyle -> Directive[FaceForm[Red, Blue]]]

Mathematica graphics

share|improve this answer
    
I get a 3D plot for r3 using RegionPlot3D[r3]. this mean that RegionPlot3D works find with ParametricRegion. –  Algohi Aug 19 at 2:50
    
yes you are correct. thanks –  Algohi Aug 19 at 2:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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