enter image description here

enter image description here

so i want to apply this graph colors to cylindrical surface.

enter image description here

Thanks Ahead!


l = 95
P = 270000
R = 15.8
h = 1.1
K = 2.9*10^10
a = 30.1
b = 1
c = Pi/2
d = 1/15.8
M[X_, ϕ_] := (-((12*P*R^4)/(K*h^3)))*

          d])/(((n/((2/3)*Pi))*Pi)^8 - ((n/((2/3)*Pi))*
           Pi)^6 + ((12*R^6)/h^2)*((m/l)*Pi)^4))*
         Sin[((m*Pi)/l)*X]*Sin[((n*Pi)/((2/3)*Pi))*ϕ], {m, 1, 
    5}, {n, 1, 5}]

Plot3D[M[X, ϕ], {X, -47.5, 47.5}, {ϕ, -(π/3), π/3}, 
 ColorFunction -> Function[{X, ϕ, z}, Hue[z]], 
 PlotLegends -> Automatic]
  • 3
    $\begingroup$ Please post copyable code instead of pictures. That will increase the probability that someone tries to answer your question. We hate unnecessary typing. $\endgroup$ – Sjoerd C. de Vries Jul 8 '15 at 17:17
  • $\begingroup$ Hello, thanks for reply and suggestions. I am new at this site and to mathematica. I tried to post copyable code instead of picture but i did not figure out how to do it. when i copyed my code it appeared as strange symbols. Could you please help me? Should i make new post or it is possible to edit this one? $\endgroup$ – John Jul 8 '15 at 21:10
  • $\begingroup$ Have a look at this meta question for copying and this one for getting Greek symbols etc. displayed as such. $\endgroup$ – Sjoerd C. de Vries Jul 8 '15 at 21:31
  • $\begingroup$ Thanks a lot I will read it and improve my post. Could you please help me meanwhile with this one? Day after tomorrow I have presentation and that's why i am hurrying. $\endgroup$ – John Jul 8 '15 at 21:35
  • 1
    $\begingroup$ You really have to paste the code here. The picture has m's and n's that are virtually indistinguishable and the same for 1's and l's (el). I cannot reproduce your figure at all. $\endgroup$ – Sjoerd C. de Vries Jul 8 '15 at 22:21

I created a cylinder using ParametricPlot3D and used your function as the ColorFunction.

I set the X coordinate to the range 0-2 and scaled it as the input to your function by 47.5*X-47.5.

I had to scale your function M[X,ϕ] by dividing it by its approximate range (0.00016) and adding 0.5 before using it as an input to Hue.

I am not convinced that the solution is correct but at least it points you in the general direction of how to plot a surface and use another function as the ColorFunction.

 {X, Sin[3 ϕ/2], Cos[3 ϕ/2]},
 {X, 0, 2},
 {ϕ, -π/3, π/3},
 Boxed -> False,
 Axes -> True,
 ColorFunction ->
  Function[{x, y, z, X, ϕ},
   Hue[0.5 + M[47.5 X - 47.5, ϕ]/0.00016]
 ColorFunctionScaling -> False

Mathematica graphics

| improve this answer | |
  • $\begingroup$ You are Brilliant! thanks a lot! That's exactly what I was asking. It was great help to me. $\endgroup$ – John Jul 9 '15 at 10:22

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.