1
$\begingroup$

I wanted to plot a 3-D solid region, in which my function f(x,y,z)=

x (1/(1 + 0.06))^3 + y (1/(1 + 0.06))^2 + (2 z^2)/15  (Sin[10 Degree])^2 -z/3  Cos[10 Degree]

is non-positive,where x, y and z are 3 variables. As can be seen in the following fig. enter image description here

I think I should first find out the neutral surface, on which f(x,y,z)=0, it is denoted as the red surface in the fig. I have tried Plot3D and ParametricPlot3D:

Plot3D[x (1/(1 + 0.06))^3 + y (1/(1 + 0.06))^2 + (2 z^2)/15  (Sin[10Degree])^2 - z/3  Cos[10 Degree], {x, 0, 8}, {y, 0, 8}, {z, 0, 82}]

and

ParametricPlot3D[x (1/(1 + 0.06))^3 + y (1/(1 + 0.06))^2 + (2 z^2)/15  (Sin[10 Degree])^2 - z/3  Cos[10 Degree], {x, 0, 8}, {y, 0, 8}, {z, 0, 82}]

But MMA reports nonopt: Options expected (instead of {z,0,82}) beyond position 3

I do know the plot of 2 variables define the 3D surface. And the plot of 3 variables define 3D space in 4D space. So, how can I to visualize the plot of 3 variables. Is there some way to use ParametricPlot3D, Plot3D or any other Mathematica functions to perform this task?

$\endgroup$
  • $\begingroup$ Can anyone get me a code for this example: Draw a tangent plane and a normal for the area z=x^2/2-y^2 at the point M(2,3,5)? $\endgroup$ – Biljana May 3 '17 at 22:06
3
$\begingroup$
sf[x_, y_, z_] :=  x (1/(1 + 0.06))^3 +  y (1/(1 + 0.06))^2 + 
                (2 z^2)/15 (Sin[10 Degree])^2 - z/3 Cos[10 Degree];

ContourPlot3D[sf[x, y, z] == 0, {x, 0, 8}, {y, 0, 8}, {z, 0, 82}]

enter image description here

sz[x_, y_] := z /. Solve[sf[x, y, z] == 0., {z}];

Plot3D[Evaluate@Quiet@sz[x, y], {x, 0, 8}, {y, 0, 8}, BoundaryStyle -> None,
       Mesh -> None, BoxRatios -> 1]

enter image description here

$\endgroup$
3
$\begingroup$

To plot a "solid region" as you request, you can use RegionPlot3D

f[x_, y_, z_] := 
 x (1/(1 + 0.06))^3 + 
  y (1/(1 + 0.06))^2 + (2 z^2)/15 (Sin[10 Degree])^2 - 
  z/3 Cos[10 Degree]

RegionPlot3D[
 f[x, y, z] < 0, {x, -2000, 2000}, {y, -2000, 2000}, {z, -2000, 2000}]

enter image description here

$\endgroup$
  • $\begingroup$ Thanks, @kguler! I have learned the ContourPlot3D from you. $\endgroup$ – Enter Nov 2 '14 at 13:04
  • $\begingroup$ Thank you,@rhermans! I have learned the use of RegionPlot3D from your answer! Although I have accepted the reply offered by @kguler, I do think your answer is very useful as well! But stack only allows to accept one answer, sorry about that! $\endgroup$ – Enter Nov 2 '14 at 13:06

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.