# How to draw (plot) a surface when z-axis value is NOT dependent on x or y

**URL:** <https://community.wolfram.com/t/how-to-draw-plot-a-surface-when-z-axis-value-is-not-dependent-on-x-or-y/5322>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [April 3, 2015, 10:40pm UTC](https://community.wolfram.com/t/how-to-draw-plot-a-surface-when-z-axis-value-is-not-dependent-on-x-or-y/5322 "2015-04-03T22:40:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcosner](https://avatars.discourse-cdn.com/v4/letter/l/839c29/32.png) [@lcosner](https://community.wolfram.com/u/lcosner)\
**Post date:** [April 3, 2015, 10:40pm UTC](https://community.wolfram.com/t/how-to-draw-plot-a-surface-when-z-axis-value-is-not-dependent-on-x-or-y/5322/1 "2015-04-03T22:40:31Z")

</div>

For example: I’d like to show, in R3, the elliptical cylinder which results from the equation 16 = 4\*(x^2) + y^2. Since this equation only specifies x and y values, it is simply an ellipse (in R2). But it defines the (infinite) elliptical cylinder, centered around the z-axis, if thought of as a surface in R3.

I can use Plot3D to create a similar cylinder, by specifying the two functions +/- (16 - 4\*(x^2))^(1/2), providing a range of values for x and y, and then using Show to combine the plots. However, the orientation is incorrect, in that this cylinder goes to infinity along the y-axis. (Yes, I know that at some level this is identical; but it is not what I wish to display.)

So is there some other 3-dimensional plot function I could use to create _exactly_ my graphic? Or have I missed something about the use(s) of Plot3D? (I’ve looked over the Wolfram documentation, and have a couple of the ‘newest’ books (though these are only Version 6, and I’m using Version 10).) Thanks for any help or guidance to resources!

---

<div class="post-metadata">

**Author:** ![kubapod](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/kubapod/32/18662_2.png) [@kubapod](https://community.wolfram.com/u/kubapod)\
**Post date:** [April 4, 2015, 11:59am UTC](https://community.wolfram.com/t/how-to-draw-plot-a-surface-when-z-axis-value-is-not-dependent-on-x-or-y/5322/2 "2015-04-04T11:59:50Z")

</div>

Plot3D is the best for drawing _functions_ defined on R2 (x-y) domain. Your cylinder is not such case.

You can use, e.g. :

```
ContourPlot3D[4 x^2 + y^2 == 16, {x, -2, 2}, {y, -4, 4}, {z, -2, 2}, BoxRatios -> Automatic]

```

---

<div class="post-metadata">

**Author:** ![lcosner](https://avatars.discourse-cdn.com/v4/letter/l/839c29/32.png) [@lcosner](https://community.wolfram.com/u/lcosner)\
**Post date:** [April 4, 2015, 5:08pm UTC](https://community.wolfram.com/t/how-to-draw-plot-a-surface-when-z-axis-value-is-not-dependent-on-x-or-y/5322/3 "2015-04-04T17:08:14Z")

</div>

Thank you VERY much. That helps a great deal!
