Is it possible to render Graphics3D in an isometric projection? I know that the ViewPoint option can be used for orthogonal projection by specifying, e.g. ViewPoint -> {0, Infinity, 0}. This doesn't take multiple infinities though, so I can't do ViewPoint -> {Infinity, -Infinity, Infinity}, for instance.
I realise that I could achieve this by rotating the entire scene about two axes and using an orthogonal projection:
Graphics3D[
Rotate[
Rotate[
Cuboid[{-.5, -.5, -.5}],
Pi/4,
{0, 0, 1}
],
ArcTan[1/Sqrt[2]],
{0, 1, 0}
],
ViewPoint -> {-Infinity, 0, 0}
]
However, this is rather cumbersome and it's harder to figure out the correct rotations for the viewpoint I'm interested in. I'd rather just specify the octant from which to view scene isometrically. Is there actually a "proper" way to achieve this?
Answer
As of V11.2 we can use a combination of ViewProjection and ViewPoint:
Graphics3D[Cuboid[], ViewProjection -> "Orthographic", ViewPoint -> {1, 1, 1}]

Various vantages:
v = Tuples[{Tuples[{-1, 1}, 3], IdentityMatrix[3]}];
Graphics3D[Cuboid[{-.5, -.5, -.5}, {1., 2., 4}], ViewProjection -> "Orthographic",
ViewPoint -> #1, ViewVertical -> #2] & @@@ v

Comments
Post a Comment