1
$\begingroup$

Prompted by an answer to question 170254, I considered

R = ParametricRegion[{{Cos[p] r Sin[t], r Sin[t] Sin[p], Cos[t] r}, 
        1 <= r <= 2 && 0 <= t <= π/2 && 0 <= p <= π/2}, {r, t, p}];
Region[R, Axes -> True, AxesLabel -> {x, y, z}, LabelStyle -> {15, Bold, Black}]

plot

which looks reasonable. However, seen from a different ViewPoint, it is not. Modest changes to ViewPoint do not change this appearance.

Region[R, Axes -> True, AxesLabel -> {x, y, z}, LabelStyle -> {15, Bold, Black},
    ViewPoint -> {-3, -1, 1/2}]

bad plot

The interior surface is misshapen. Have I overlooked something, or is this a bug?

As J.M. noted in a comment, this looks like the result of insufficient sampling. Yet, I would expect the appearance of the region to be the same in the y - z plane as in the x - z plane due to symmetry. Incidentally, PlotPoints is not an accepted option for Region.

$\endgroup$
4
  • 1
    $\begingroup$ Region[] sometimes produces pictures where the sampling is insufficient; you'd see similar things with (Boundary)DiscretizeRegion[]. $\endgroup$ Commented Jun 4, 2022 at 20:59
  • $\begingroup$ @J.M. Thanks for this insight, as well as for correcting the title. Is there a way to increase sampling? PlotPoints is not accepted as an Option. By the way, I would expect the appearance of the region to be the same in the y - z plane as in the x - z plane due to symmetry $\endgroup$
    – bbgodfrey
    Commented Jun 4, 2022 at 21:50
  • $\begingroup$ That I do not know; it sounds like a good thing to append to your question. $\endgroup$ Commented Jun 4, 2022 at 21:56
  • $\begingroup$ Strangely, setting the variables to some values (0 will do) before calling ParametricRegion[] results in a much smoother curve. $\endgroup$ Commented Jun 4, 2022 at 23:19

0

Your Answer

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