0
$\begingroup$

At last I solved a math problem and trying to illustrate it in Mathematica TO NOT FORGET.

I used that code. I works and I get a cake-form. But I think it's missing a big $x$ and a big $y$ axis in the middle.

RevolutionPlot3D[{{x, (4 x - x^2)}}, {x, 0, 4}, {th, 0, 2 π},  
Boxed -> False, BoxRatios -> {1, 1, 0.3}, ViewPoint -> {0, 4, 0},  
AxesLabel -> {x, y, z}]

A nice person @rhermans helped me to draw another problem here.

So I tried to apply his code (to apply and learn) but it's not working.

CoordinateTransform[  "Cylindrical" -> "Cartesian", {r, θ, 4 x - x^2}]

With[{parmcartsn = CoordinateTransform["Cylindrical" -> "Cartesian", {r, θ, 4 x - x^2}]},
 Column[{ParametricPlot3D[parmcartsn, {r, 0, 4}, {θ, 0, 2 π}, 
PlotLabel -> TraditionalForm[parmcartsn]], Area[parmcartsn, {r, 0, 4}, {θ, 0, 2 π}]}]]

I just get a sad empty box with coordinates...

$\endgroup$
1
$\begingroup$

Changing 4 x - x^2 to 4 r - r^2 gives the desired result:

With[{parmcartsn = CoordinateTransform["Cylindrical" -> "Cartesian", {r, θ, 4 r - r^2}]},
 Column[{ParametricPlot3D[parmcartsn, {r, 0, 4}, {θ, 0, 2 π}, 
    PlotLabel -> TraditionalForm[parmcartsn]], 
  Area[parmcartsn, {r, 0, 4}, {θ, 0, 2 π}]}]]

enter image description here

$\endgroup$
  • $\begingroup$ Thank you, it does indeed. $\endgroup$ – Dovendyr Jun 27 '18 at 12:16

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.