2

I would like to project the output of RegionPlot3D onto a 2D plane. Basically I'd like to turn this

f = a^2  + b^3 + c;
RegionPlot3D[f <= 0.5, {a, 0, 1}, {b, 0, 1}, {c, 0, 1}, 
 AxesLabel -> Automatic, ColorFunction -> "Rainbow", 
 ViewPoint -> Above, Mesh -> None]

into something more like a contour plot (colour showing what the c value is). I am only interested in the maximum value for c that will satisfy the constraints - so I would like to project onto a 2D plane.

My actual functions are considerably more complex, and the 3D image makes it harder to see the detail.

Esme_
  • 693
  • 4
  • 12

1 Answers1

2

This post https://mathematica.stackexchange.com/a/21726/34694 gave me the solution - essentially set the z-axis viewpoint to infinity and you will have a 2D projection.

f = a^2 + b^3 + c;
RegionPlot3D[f <= 0.5, {a, 0, 1}, {b, 0, 1}, {c, 0, 1}, 
 AxesLabel -> Automatic, ColorFunction -> "Rainbow", 
 ViewPoint -> {0, 0, Infinity}, Mesh -> None, 
 Axes -> {True, True, False}]

Mathematica graphics

Edit: Note that removing the AxesLabel -> Automatic, gets rid of the z axis label issue in the bottom left hand corner

Esme_
  • 693
  • 4
  • 12
  • 1
    You could also combine these two options ...ViewPoint -> Top, ViewProjection -> "Orthographic"... to get the same effect. – Pinti Apr 12 '19 at 07:04