7
$\begingroup$

Here is a working Mathematica code for a 3d plot:

potential = Plot3D[-{-(2.16023) x^2 - (6.26501) y^2 + (2.54649) x^3 + (21.1988) \ x y^2}, {x, 0, 0.5}, {y, -0.2, 0.2}, PlotRange -> Automatic, PlotStyle -> {Cyan, Opacity[0.7]}, ViewPoint -> {1, -1.75, 1}, Mesh -> None, AxesLabel -> {"x", "y", "V"}, PlotStyle -> PointSize[.005], ImageSize -> 500, ImageMargins -> 10, LabelStyle -> Directive[Black, 20]] 

which gives me the following output:

3d-plot

Now, I wish to make some aesthetic shadow work beneath, for which I take the help of this piece of code:

a = Style[ Graphics3D[{First[potential], White, Polygon[5 {{-0.1, -0.1, 0}, {-0.1, 0.1, 0}, {0.1, 0.1, 0}, {0.1, -0.1, 0}} + Threaded[{0, 0, -0.3}]]}, Lighting -> {AmbientLight[RGBColor[0.2, 0.2, 0.2]], {"Area", RGBColor[0.65, 0.65, 0.65], {0, 0, 18}, {{4, 0, 0}, {0, 4, 0}}}}, Boxed -> False, ViewPoint -> {2, -1.75, 1.05}, ViewVertical -> {0, 0, 1}, Method -> {"RayTracing" -> {"ImageSamples" -> 150, "RayBounce" -> 2}}], RenderingOptions -> {"3DRenderingMethod" -> "RayTracing"}] 

This gives me two different outputs when run on MacOS and Windows; here is a comparison:

comparison

Why is the RayTracing option not working on Windows, and is there any workaround for that? Also, how to include the axes in the shadow figure as well? Is there a way by which I can get something like this figure(showing the stationary points) with a blurry shadow beneath it?

wanted

$\endgroup$
2
  • 1
    $\begingroup$ This also failed on the Wolfram Cloud (14.0.0 for Linux x86 (64-bit) (December 13, 2023)) $\endgroup$ Commented Jun 13, 2024 at 16:33
  • 1
    $\begingroup$ To see the axes include the option Axes -> True (and delete Boxed -> False if you also want the box). $\endgroup$ Commented Jun 13, 2024 at 16:42

1 Answer 1

13
$\begingroup$

It is an undocumented/highly experimental feature. It is so experimental, it has only been implemented on Mac using Metal. I do not have a timeframe for when it might be elevated to an experimental (yet documented) feature.

$\endgroup$
2
  • $\begingroup$ Is there any workaround for now? $\endgroup$ Commented Jun 13, 2024 at 18:08
  • $\begingroup$ Other than not using ray tracing? No. $\endgroup$ Commented Jun 13, 2024 at 18:37

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.