1
$\begingroup$

This question already has an answer here:

I have a function of two variables (r,theta), and I would like to plot it as a surface using cylindrical coordinates. Based on my research, there is no built mathematica function for plotting functions in cylindrical coordinates.

Does anybody know of an easy work around?

EDIT: This is the function I want to plot (rho is r, tau is theta):

    3139.30526902869 + 102.123379245362 rho^2 - 15.5488797234294 rho^3 - 
 266.860422394968 rho^4 + 352.939022246368 rho^5 - 
 177.650227764971 rho^6 + 32.3137965311735 rho^7 + 
 0.5 ((71.3031143385107 rho + 139.943686959156 rho^2 - 
      288.026533191997 rho^3 - 141.727925001156 rho^4 + 
      529.411939943406 rho^5 - 348.650914603488 rho^6 + 
      72.9549122110715 rho^7)^2 + (-191.96670847536 rho^2 + 
      587.950050964428 rho^3 - 1088.17258144159 rho^4 + 
      1092.65434933959 rho^5 - 528.631898142894 rho^6 + 
      97.0939894194787 rho^7)^2 + 
    2 (71.3031143385107 rho + 139.943686959156 rho^2 - 
       288.026533191997 rho^3 - 141.727925001156 rho^4 + 
       529.411939943406 rho^5 - 348.650914603488 rho^6 + 
       72.9549122110715 rho^7) (-191.96670847536 rho^2 + 
       587.950050964428 rho^3 - 1088.17258144159 rho^4 + 
       1092.65434933959 rho^5 - 528.631898142894 rho^6 + 
       97.0939894194787 rho^7) Cos[3 \[Degree] tau])^0.5
$\endgroup$

marked as duplicate by Jens, Dr. belisarius plotting Jul 27 '15 at 23:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Yes: use the equations to convert to Cartesian, and then use ParametricPlot3D[]. Or, look up RevolutionPlot3D[]. $\endgroup$ – J. M. will be back soon Jul 27 '15 at 18:53
3
$\begingroup$

I think the function you are looking for is RevolutionPlot3D. I chose to plot rho from 0 to 5 and tau from 0 to 2 pi.

f[rho_, tau_] := 
 3139.30526902869 + 102.123379245362 rho^2 - 15.5488797234294 rho^3 - 
  266.860422394968 rho^4 + 352.939022246368 rho^5 - 
  177.650227764971 rho^6 + 32.3137965311735 rho^7 + 
  0.5 ((71.3031143385107 rho + 139.943686959156 rho^2 - 
         288.026533191997 rho^3 - 141.727925001156 rho^4 + 
         529.411939943406 rho^5 - 348.650914603488 rho^6 + 
         72.9549122110715 rho^7)^2 + (-191.96670847536 rho^2 + 
         587.950050964428 rho^3 - 1088.17258144159 rho^4 + 
         1092.65434933959 rho^5 - 528.631898142894 rho^6 + 
         97.0939894194787 rho^7)^2 + 
      2 (71.3031143385107 rho + 139.943686959156 rho^2 - 
         288.026533191997 rho^3 - 141.727925001156 rho^4 + 
         529.411939943406 rho^5 - 348.650914603488 rho^6 + 
         72.9549122110715 rho^7) (-191.96670847536 rho^2 + 
         587.950050964428 rho^3 - 1088.17258144159 rho^4 + 
         1092.65434933959 rho^5 - 528.631898142894 rho^6 + 
         97.0939894194787 rho^7) Cos[3 \[Degree] tau])^0.5

RevolutionPlot3D[f[r, t], {r, 0, 5}, {t, 0, 2 \[Pi]}]

Plot of Function

$\endgroup$
  • $\begingroup$ Extending BenP1192's answer, I am pretty sure that when user30234 wrote Cos[3 [\Degree] tau] his intention was to treat tau as ranging from 0 to 360. As it currently stands there is no visible variation with azimuth. Simply dropping [Degree] from the function will fix this. Second point is that the terms involving 71.3..*rho... and -191.96..*rho^2... are user twice. I would speed it up a bit and make it easier to read if the RHS of the function were enclosed with a With[{term1 = 71.3..rho..., term2 = -191.96..*rho^2}, ...] $\endgroup$ – Jack LaVigne Jul 28 '15 at 14:34

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