3
$\begingroup$

Why is this RevolutionPlot3D empty in the middle around x = 0.5 like this?

RevolutionPlot3D[Min[x^2, x^2 - 2 x + 1], {x, 0, 1}, 
 RevolutionAxis -> "X", BoxRatios -> {1, 1, 1}]

enter image description here

$\endgroup$
2
  • $\begingroup$ Please write an INFORMATIVE title... one that deals with the content of your question more specifically. After all, what do YOU think the average reader understands from your title alone? $\endgroup$ Commented Apr 14, 2022 at 3:13
  • 1
    $\begingroup$ @DavidG.Stork sorry for that. I didn't notice much as it was the only thing in my mind. $\endgroup$
    – hana
    Commented Apr 14, 2022 at 5:20

1 Answer 1

8
$\begingroup$

Original answer

RevolutionPlot3D[Min[x^2, x^2 - 2 x + 1], {x, 0, 1}, 
 RevolutionAxis -> "X", BoxRatios -> {1, 1, 1}, Exclusions -> None]

revplot

Edit: many thanks to @Bob Hanlon for suggesting the use of MaxRecursion

RevolutionPlot3D[Min[x^2, x^2 - 2 x + 1], {x, 0, 1}, 
 RevolutionAxis -> "X", BoxRatios -> {1, 1, 1}, Exclusions -> None, 
 MaxRecursion -> 6]

rev2

$\endgroup$
8
  • 1
    $\begingroup$ +1 MaxRecursion -> 6 is useful $\endgroup$
    – Bob Hanlon
    Commented Apr 13, 2022 at 23:30
  • 2
    $\begingroup$ rgn = ImplicitRegion[(y^2 + z^2 <= x^4 && 0 <= x <= 1/2) || (y^2 + z^2 <= (x^2 - 2 x + 1)^2 && 1/2 < x <= 1), {x, y, z}]; Then Volume[rgn] evaluates to Pi/80 $\endgroup$
    – Bob Hanlon
    Commented Apr 14, 2022 at 0:28
  • 1
    $\begingroup$ I found an old thread and this works too. ImplicitRegion[ z^2 + y^2 <= Min[x^2, x^2 - 2 x + 1]^2 && 0 <= x <= 1, {x, y, z}] $\endgroup$
    – hana
    Commented Apr 14, 2022 at 1:05
  • 1
    $\begingroup$ @hana I think that the main idea -which was initially demonstrated by Bob here- is to use $x,y,z$ as variables such that Volume is well-defined. Great suggestions by both!!! $\endgroup$
    – bmf
    Commented Apr 14, 2022 at 1:11
  • 1
    $\begingroup$ Thanks for the update and the MaxRecursion -> 6 looks much nicer! $\endgroup$
    – hana
    Commented Apr 14, 2022 at 5:22

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.