2
$\begingroup$

I have two 2D plots which came from taking slices of a 3D data set of the form (x,y,z,intensity). I manually "sliced" the data set to get the slices I wanted from two planes of interest and plotted them using ListDensityPlot. I also overlayed on each of them some lines to demonstrate certain symmetries of the resulting plots. The results look like this enter image description here enter image description here

The first corresponds to the x-y plane (called here [hk0]), and the second to the (x=y)-z plane (called here [hhl]). That is, the points in each plot correspond to the 3d point $$\vec{q} = h \hat{x} + k \hat{y} + l \hat{z}$$

I would like to take each of these, and turn them into a 2-sided 2D "surface", then put these two planes in the proper orientation to each other in 3 dimensions.

I could potentially use ListSliceDensityPlot3D but I would like to have the grid lines drawn on the plots as well. In the end I'm looking to make something a bit like this (but not these planes):

enter image description here

Note that the white dashed lines were created by combining Line Graphics. As a bonus, I'd like to know how to make my line dashes more consistent, here we can see that some of the lines look almost solid.

$\endgroup$
3
  • $\begingroup$ Your plots are already so beautiful. Combining them will not make them look more crispy. $\endgroup$
    – yarchik
    Feb 15, 2020 at 19:56
  • $\begingroup$ @yarchik thanks for the compliment :) I actually want to do it for a demonstration purpose, for the visualization of the symmetries. We always look at these plots as 2d, but I'd like to make the 3d nature of these guys more obvious. It's not for publication purpose :P $\endgroup$
    – Kai
    Feb 15, 2020 at 20:21
  • $\begingroup$ I would try to use ListSliceContourPlot to get the slices, and then simply add the Line primitives to the result. You could also use Tube to get "3D" lines that have less issues with clipping when they are directly on top of the slices. The advantage of adding the lines like this is that they stay sharp, where your Texture based approach will necessarily rasterize them. $\endgroup$
    – Lukas Lang
    Feb 21, 2020 at 23:27

1 Answer 1

2
$\begingroup$

I was able to do it using Texture,

hk0 = Texture@
   Show[ListDensityPlot[Shk0, InterpolationOrder -> 1, 
     AspectRatio -> Automatic, 
     ColorFunction -> ColorData["SunsetColors"]], hk0Outline, 
    Frame -> False];
hhl = Texture@
   Show[ListDensityPlot[Shhl, InterpolationOrder -> 1, 
     AspectRatio -> 1/Sqrt[2], 
     ColorFunction -> ColorData["SunsetColors"]], hhlOutline, 
    Frame -> False];
hk0plane = 
  Graphics3D[{hk0, 
    Polygon[{{-4, -4, 0}, {-4, 4, 0}, {4, 4, 0}, {4, -4, 0}}, 
     VertexTextureCoordinates -> {{0, 0}, {0, 1}, {1, 1}, {1, 0}}]}];
hhlplane = 
  Graphics3D[{hhl, 
    Polygon[{{-4, -4, -4}, {-4, -4, 4}, {4, 4, 4}, {4, 4, -4}}, 
     VertexTextureCoordinates -> {{0, 0}, {0, 1}, {1, 1}, {1, 0}}]}];
Show[hk0plane, hhlplane, ImageSize -> Large]

where Shk0 and Shhl are the respective data sets, hk0Outline and hhlOutline are the respective dashed white lines.

I also added the actual volume which corresponds to the dashed lines and I'm pretty happy with it, I'll keep fiddling to improve it.

enter image description here

Note, however, that the resulting 3d object is extremely slow to manipulate in any way.

$\endgroup$

Your Answer

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

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