I'm aware of two ways to manage positioning of Axes
for Graphics3D
: AxesOrigin
and AxesEdge
. They seem to be quite different in terms of what is actually happening:
GraphicsRow[{
Graphics3D[##, AxesOrigin -> {0, 0, 0}],
Graphics3D[##, AxesEdge -> {{-1, -1}, {-1, -1}, {-1, -1}}]
} &[Sphere[{1, 1, 1}, 1], Axes -> True, ViewPoint -> {5, 7, 3}]]
I want the graphics elements to be up front.
For axes being a part of the box it is natural to use AxesEdge
since it gives me that effect.
However sometimes I want the axes origin to be inside the box. AxesEdge
is useless and AxesOrigin
creates strange effect:
Graphics3D[{Opacity@1, Sphere[{1, 1, 1}, 1]}, Axes -> True, AxesOrigin -> {1, 1, 1}]
Axes created with AxesOrigin
seem to be different object than with AxesEdge
. It looks like some kind of 2D projection in front of 3D graphics while AxesEdge
creates something which is part of 3D graphics.
As one may know there (..find undocumented options...) is an undocumented option Method -> { "AxesInFront" -> False }
to deal with this issue in $2D$ graphics.
It doesn't seem to work in $3D$. So my question is if anyone is aware of, maybe undocumented, option responsible for that.
If this is a projection it could be behind the Graphics3D
objects too, couldn't it be? (that's a little bit naive, in form, question since I do not know much about graphics rendering etc)
P.s. I do not expect answers like "You can use FindDivisions
+Line
" etc. I'm looking for simple and fast solution. Or an answer that there isn't any. (spelunking appreciated too:))
Answer
If I understand correctly, in the case of your sphere you'd like the sphere to obscure your axes and ticks, except perhaps for a little bit where they poke out at the edges.
This isn't currently possible without writing your own axes using Line
and Inset
.
The "AxesInFront"
and other "...InFront"
method options only apply to Graphics
which doesn't have a natural $z$-order.
Comments
Post a Comment