0
$\begingroup$

Say I have a simple 2D function like $y=100-x^2$. I want to also represent it in a third dimension "z". I will then combine this with a 3-dimensional figure (say Plot3D depiction of a pyramid) so that the vertical projection of $y=100-x^2$ "slices" the pyramid.


I've got this:

p41 = Plot3D[(1/2) ((1 - x/8) + (1 - y/17) - 
     Abs[(1 - x/8) - (1 - y/17)]), {y, 5, 17}, {x, 5, 8}, 
  BoxRatios -> 1, FaceGrids -> All, 
  PlotStyle -> {Green, Opacity[0.2]}, ViewPoint -> {2, 2, 2}, 
  PlotRange -> {{0, 17}, {0, 10}, {0, 1.5}}, ImageSize -> Large]

p42 = Plot3D[0 x + 0 y, {y, 0, 17}, {x, 0, 10}, PlotStyle -> Yellow]

enter image description here enter image description here

I can combine them using Show[p41, p42]. I would also like to add in a vertical 3D surface in {x, y, z} space with something like:

p43 = Plot[10 - x^1.3/4, {x, 0, 17}]

enter image description here

$\endgroup$
  • 2
    $\begingroup$ $y = 100-x^2$ is not a 2D function. Find an online plot such as you seek and we'll show you how to program it. $\endgroup$ – David G. Stork Jul 19 '17 at 18:50
  • $\begingroup$ I've got this: p41 = Plot3D[(1/2) ((1 - x/8) + (1 - y/17) - Abs[(1 - x/8) - (1 - y/17)]), {y, 5, 17}, {x, 5, 8}, BoxRatios -> 1, FaceGrids -> All, PlotStyle -> {Green, Opacity[0.2]}, ViewPoint -> {2, 2, 2}, PlotRange -> {{0, 17}, {0, 10}, {0, 1.5}}, ImageSize -> Large], this: p42 = Plot3D[0 x + 0 y, {y, 0, 17}, {x, 0, 10}, PlotStyle -> Yellow]. I can combine them using Show[p41, p42]. I would also like to add in a vertical 3D surface in {x, y, z} space with something like: p43 = Plot[10 - x^1.3/4, {x, 0, 17}]. $\endgroup$ – John Jul 19 '17 at 23:44
1
$\begingroup$

I think you want something like this:

Show[
   Graphics3D[{Opacity[.5], Sphere[{0, 0, 0}, 50]}],
   ParametricPlot3D[{x, 100 - x^2, z}, {x, -12, 12}, {z, -50, 50}]
]
$\endgroup$

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.