3

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

hana
  • 2,388
  • 5
  • 19
  • 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? – David G. Stork Apr 14 '22 at 03:13
  • 1
    @DavidG.Stork sorry for that. I didn't notice much as it was the only thing in my mind. – hana Apr 14 '22 at 05:20

1 Answers1

8

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

bmf
  • 15,157
  • 2
  • 26
  • 63
  • 1
    +1 MaxRecursion -> 6 is useful – Bob Hanlon Apr 13 '22 at 23:30
  • Thanks, probably a bit off topic but how would you represent this volume by ImplicitRegion? I want to know this so I can calculate volume to confirm with my other method using integral. – hana Apr 13 '22 at 23:37
  • @BobHanlon indeed. A very nice alternative. Thanks for pointing this out. – bmf Apr 14 '22 at 00:11
  • @hana I guess you mean something like the answer provided here right? – bmf Apr 14 '22 at 00:13
  • 2
    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 – Bob Hanlon Apr 14 '22 at 00:28
  • 1
    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}] – hana Apr 14 '22 at 01:05
  • 1
    @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!!! – bmf Apr 14 '22 at 01:11
  • 1
    Thanks for the update and the MaxRecursion -> 6 looks much nicer! – hana Apr 14 '22 at 05:22