0
$\begingroup$

I would like to know how this 3D graphic could interpreset the y axis as being the up direction and the z axis flipped so that it creates a left handed coordinate system?

Graphics3D[{
    {Red,   Arrow[{{0, 0, 0}, {1, 0, 0}}]}, 
    {Green, Arrow[{{0, 0, 0}, {0, 1, 0}}]}, 
    {Blue,  Arrow[{{0, 0, 0}, {0, 0, 1}}]}
},
Axes -> True, 
AxesLabel -> {x, y, z}]
$\endgroup$
1
  • $\begingroup$ You should be able to use some GeometricTransformation to transform the graphics primitives. Then you can simply reorder the axes labels and you should be done $\endgroup$
    – Lukas Lang
    Nov 4, 2021 at 20:53

1 Answer 1

1
$\begingroup$

You could e.g. negate the z coordinates and exchange y and z. For clarity I write the graphics in a separate statement:

gr = {{Red, Arrow[{{0, 0, 0}, {1, 0, 0}}]}, {Green, 
    Arrow[{{0, 0, 0}, {0, 1, 0}}]}, {Blue, 
    Arrow[{{0, 0, 0}, {0, 0, 1}}]}}  /. {x_?NumericQ, y_, 
    z_} -> {x, -z, y}
Graphics3D[gr, Axes -> True, AxesLabel -> {x, z, y}]

enter image description here

$\endgroup$
2
  • $\begingroup$ This is mostly what I want, but is there a way for the z axis to be flipped, even if I enter Arrow[{{0, 0, 0}, {0, 0, 1}}] for it's arrow instead of Arrow[{{0, 0, 0}, {0, 0, -1}}]? $\endgroup$
    – mbl
    Nov 6, 2021 at 19:53
  • $\begingroup$ ??? But I specified Arrow[{{0, 0, 0}, {0, 0, 1}}] $\endgroup$ Nov 6, 2021 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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