1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Can you always solve for a, b, or c, or are they trapped in a complicated implicit relationship? $\endgroup$ – J. M. is away Mar 27 at 6:53
  • $\begingroup$ Complicated implicit relationships unfortunately. There are also multiple conditions within the Region plot to ensure what is returned is physical as well. $\endgroup$ – Esme_ Mar 27 at 23:04
1
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ You could also combine these two options ...ViewPoint -> Top, ViewProjection -> "Orthographic"... to get the same effect. $\endgroup$ – Pinti Apr 12 at 7:04

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.