I am trying to plot a multilayered system of distinct symmetric planes as shown in the figure below, the system should have a reference label.
I don't know if I can draw it using Mathematica or another software.
2 Answers
$\begingroup$
$\endgroup$
1
I think you can take it from here.
SeedRandom[1];
a = 1;
b = 1;
c = 1;
ball = Ball[{0, 0, 0}, 1];
c1 = RegionCentroid[ball];
rect3D = Table[{{-2, -2, i}, {2, -2, i}, {2, 2, i}, {-2, 2, i}}, {i,
0, -4, -0.5}];
axes = {
Arrowheads[0.04]
, {Red, Arrow[Tube[{c1, 2.5 UnitVector[3, 1]}, 0.01]]
, Text[Style["x", Bold, 14], a UnitVector[3, 1] + {2, 0, 0}]
, {Black, Dashed,
InfiniteLine[{-UnitVector[3, 1], UnitVector[3, 1]}]}
}
, {Blue, Arrow[Tube[{c1, 2.5 UnitVector[3, 2]}, 0.01]]
, Text[Style["y", Bold, 14], b UnitVector[3, 2] + {0, 2, 0}]}
, {Black, Dashed,
InfiniteLine[{-UnitVector[3, 2], UnitVector[3, 2]}]}
, {Darker@Green, Arrow[Tube[{c1, 2 UnitVector[3, 3]}, 0.01]]
, Text[Style["z", Bold, 14], c UnitVector[3, 3] + {0, 0, 2}]}
, {Black, Dashed,
InfiniteLine[{-UnitVector[3, 3], UnitVector[3, 3]}]}
, {
Arrowheads[0.03], Black, Dashed
, Arrow[Tube[{c1, Normalize[{2, 2, 2}]}, 0.005]]
}
, {Black, AbsolutePointSize[6], Point@c1}
, {Opacity[0.2, Lighter@Green], ball}
};
polys = MapThread[
{FaceForm[#1], EdgeForm[#2], Polygon@#3} &
, {
ConstantArray[White, Length@rect3D]
, {Thin, Thin, Thin, DotDashed, Dotted, Dashed, Thin, Thin, Thick}
, rect3D
}
];
text = {
Text[Style["l == 1", 14, Bold, Black, Italic,
"Times"], {-2.3, -2.3, 0}]
, Text[
Style["l == 2", 14, Bold, Black, Italic,
"Times"], {-2.3`, -2.3`, -0.5`}]
, Text[
Style["L", 14, Bold, Red, Italic, "Times"], {-2.3`, -2.3`, -4.`}]
, {Arrowheads[{-0.018, 0.018}], Black
, Arrow[Tube[{{2.2`, 2.2`, -3.5`}, {2.2`, 2.2`, -4.`}}], 0.0005]
, Text[
Style[TraditionalForm[Subscript[J, ll']], Bold, Black,
16], {2.4`, 2.4`, -3.75`}]
}
};
Show[
Graphics3D[{polys
, axes
, text
}
, Lighting -> "Neutral"
, Boxed -> False
, ImageSize -> 600
, SphericalRegion -> True
]
]
-
$\begingroup$ I have added the ball for no reason, but it may help visualize vectors that are at different 3D angles. $\endgroup$– SyedCommented Sep 6, 2023 at 14:33
$\begingroup$
$\endgroup$
Here is something to get you started.
You may stack a number of infinite planes. To write text in 3D in a random direction, you may place every character separately.
txt[s_, pos_] := Module[{chars = Characters[s], c = 0},
Text[#, pos + {0.2 c++, 0, 0.2}] & /@ chars
]
Graphics3D[{InfinitePlane[{{0, 0, 0}, {0, 1, 0}, {1, 0,
0}}], {EdgeForm[Directive[Dashed]], FaceForm[Opacity[0.1]],
InfinitePlane[{{0, 0, 1}, {0, 1, 1}, {1, 0, 1}}]},
InfinitePlane[{{0, 0, 2}, {0, 1, 2}, {1, 0, 2}}],
txt["Text1", {5, 0, 0}], txt["Text2", {5, 0, 1}],
txt["Text3", {5, 0, 2}]}, Boxed -> False,
PlotRange -> {{0, 10}, {0, 10}, {0, 2.5}}]