I am learning a bit about TikZ and found a nice feature in its graphics, that I am having hard time duplicating with Graphics3D
. It is making a Cylinder
, where the bottom will have part of its edge, that is behind the current view, show up as dashed lines. Ofcourse the Cylinder
will have to be a little transparent to see the edge (using Opacity
).
Another obstacle I found, is that one can't Inset
3D object inside another 3D object in Mathematica. I hope this will become possible in future versions.
Here is the latex question that shows how this is done in TikZ. Here is screen shot of the final shape (the letter A
is not needed)
This is what I tried: Make cylinder, remove its EdgeForm, make another cylinder to use for the bottom part, which is very thin, and have its edge be dashed.
But this does not really solve the problem, as I need to have the edge that is "behind" the current view be dashed.
The reason for asking, is not just for fun, but this will actually make the disk appear more real if it is possible to make the behind view edge dashed (or other color) from the front facing edge. So this can be useful feature for many other 3D objects making.
g1 = Graphics3D[{Opacity[.5], EdgeForm[], Yellow,
Cylinder[{{0, 0, 0}, {0, 0, 1}}, 1]}]
g2 = Graphics3D[{EdgeForm[Directive[Thin, Dashed, Red]], FaceForm[],
Cylinder[{{0, 0, 0}, {0, 0, .01}}, 1]}]
Now combined
Graphics3D[{First@g1, First@g2}]
Close, but no cigar.
g = Graphics3D[Cylinder[{{0, 0, 0}, {0, 0, 1}}, 1]]; DashedGraphics3D[g, Lighting -> "Neutral"]
!Mathematica graphics which works, and is very nice. But I was thinking of an actual 3D graphics, not rasterized version, which I can rotate and move and use in animation, etc.. yet still have this feature. May be I am asking too much come to think about? $\endgroup$