2
$\begingroup$

I want to plot the elliptic paraboloid z=4(x-1)^2+(y+2)^2+3 but no matter what the range of x values and the range of y values I give, I can not plot a beautiful ellptic parabolid. This is what I tried

Plot3D[3 + 4 (x-1)^2 + (y+2)^2, {x, -11, 13}, {y, -26, 22}]

and this is what I get

enter image description here

I need to get something similar to this

enter image description here

I even tried to restrict the z values but it did not work.

$\endgroup$
2
  • 1
    $\begingroup$ Plot3D[3 + 4 (x - 1)^2 + (y + 2)^2, {x, -11, 13}, {y, -26, 22}, RegionFunction -> Function[{x, y, z}, 3 + 4 (x - 1)^2 + (y + 2)^2 < 420]] $\endgroup$
    – user46676
    Mar 17, 2017 at 4:18
  • $\begingroup$ At least closely related: 27169 $\endgroup$
    – Kuba
    Mar 17, 2017 at 17:05

2 Answers 2

3
$\begingroup$

Consider using ParametricPlot3D with re-parametrization and translation after, e.g.:

ParametricPlot3D[{u Cos[v]/2, u Sin[v ], u^2} + {1, -2, 3}, {u, 0, 
  30}, {v, 0, 2 Pi}, BoxRatios -> {1, 1, 1}, 
 PlotRange -> {{-20, 20}, {-35, 35}, {0, 1000}}, 
 ColorFunction -> "Rainbow"]

enter image description here

$\endgroup$
2
$\begingroup$

An alternative approach is

Plot3D[3 + 4 (x - 1)^2 + (y + 2)^2, {x, -20, 20}, {y, -35, 35}, 
    PlotRange -> {0, 1000}, BoxRatios -> {1, 1, .6}, 
    ColorFunction -> "Rainbow", ClippingStyle -> None, 
    MeshFunctions -> {#3 &, ArcTan[2 #1, #2] &}]

enter image description here

Add the options Axes -> False, Boxed -> False to eliminate the tick marks and box, if desired.

Addendum

Plot3D[3 + 4 (x - 1)^2 + (y + 2)^2, {x, -20, 20}, {y, -40, 40}, 
    PlotRange -> {0, 1000}, BoxRatios -> {1, 1, .55}, 
    ClippingStyle -> None, Mesh -> {15, 29}, 
    MeshFunctions -> {#3 - 3 &, ArcTan[2 #1 - 2, #2 + 2] &}, 
    ViewPoint -> {0, 100000, 42000}, Axes -> False, Boxed -> False, 
    ColorFunction -> (Hue[Max[.6 #3/1000 - .4, -.18]] &), 
    ColorFunctionScaling -> False, Lighting -> {{"Ambient", White}}]

gives an image closer to that in the question. Better agreement probably would require a nonlinear ColorFunction.

enter image description here

$\endgroup$
3
  • $\begingroup$ +1 adjusting the plot range and box ratios and nice mesh functions much more natural than my answer...I just like reparametrizations...:) $\endgroup$
    – ubpdqn
    Mar 17, 2017 at 5:53
  • $\begingroup$ Thanks for your answer. I apologize that I can not upvote your answer as I do not have enough reputation to be able to upvote. $\endgroup$
    – user47406
    Mar 17, 2017 at 6:50
  • $\begingroup$ @ubpdqn +1 I like reparameterization too and wish I had thought of it here. Best wishes. $\endgroup$
    – bbgodfrey
    Mar 17, 2017 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.