5
$\begingroup$

I'm looking to get publication-quality illustrations in the style of "Interactive Linear Algebra" book where z=0 plane has the look of graph-paper

enter image description here

What is a good pattern to achieve this effect?

circle = RegionPlot3D[{0.4 < x^2 + y^2 < .5}, {x, -1, 1}, {y, -1, 
   1}, {z, 0, .1}, Mesh -> False, PlotPoints -> 75, Boxed -> False, 
  AspectRatio -> 1, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}]
$\endgroup$
1
  • 2
    $\begingroup$ You can try this: Show[plot1, Plot3D[0, {x, -1, 1}, {y, -1, 1}, PlotStyle -> None, Mesh -> 5]]. The mesh density is controlled by the Mesh option. $\endgroup$
    – Domen
    Jul 25, 2021 at 22:47

2 Answers 2

8
$\begingroup$
Histogram3D[CirclePoints[20000], Axes -> False, Boxed -> Bottom, 
 FaceGrids -> {{0, 0, -1}}]

enter image description here

$\endgroup$
6
$\begingroup$

I'm getting something close by using a combination of Mesh, MeshStyle, BoundaryStyle and Arrow primitives.

downsides:

  1. intersection artifacts between Arrow objects and the solid
  2. bottom part of arrow is not occluded properly
th = 0.0015;
plot = RegionPlot3D[{0.4 < x^2 + y^2 < .5}, {x, -1, 1}, {y, -1, 
    1}, {z, 0, .1}, Mesh -> False, PlotPoints -> 75, Boxed -> False, 
   AspectRatio -> 1, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, 
   BoundaryStyle -> Thickness[th]];
arrows = Graphics3D[{Arrowheads[0.02], Thickness[th], 
    Arrow[{{1, 0, 0}, {-1, 0, 0}}], Arrow[{{0, 0, -1}, {0, 0, 1}}], 
    Arrow[{{0, 1, 0}, {0, -1, 0}}]}];
plane = Plot3D[0, {x, -1, 1}, {y, -1, 1}, PlotStyle -> None, 
   Mesh -> 5, MeshStyle -> Directive[Thickness[.001], Opacity[.2]], 
   BoundaryStyle -> Directive[Thickness[th], Opacity[.2]]];
img = Show[plot, arrows, plane, Axes -> None, Boxed -> False]

enter image description here

Edit Axis occlusion artifacts are fixed with "3DRenderingMethod" -> "BSPTree", however it introduces occlusion artifacts within the solid. Seen in default Viewpoint, but much more visible under ViewProjection -> "Orthographic"

enter image description here

Using RenderingOptions -> {"3DRenderingEngine" -> "Mesa"} fixes the occlusion artifacts, but now diagonal axes have rendering artifacts.

enter image description here

On MacOS having a 3D graphic cell with non-default rendering method introduces 1-2 second "spinning beach ball" hangs, so use these options for export only

$\endgroup$
1
  • $\begingroup$ In the end, best results with "3DRenderingMethod" -> "BSPTree" and avoiding ViewProjection -> "Orthographic" $\endgroup$ Aug 5, 2021 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.