1
$\begingroup$

How do I explicitly specify the directive that's used to color objects in Graphics3D?

IE, in the graphics below, I wanted last sphere and the first sphere to have the same colors, Automatic doesn't see to be a thing

Graphics3D[{Sphere[{0,0,0}], Red, Sphere[{1, 0, 0}, 1], Automatic, Sphere[{2, 0, 0}, 1]}]
$\endgroup$
1
  • $\begingroup$ Reminder of that. $\endgroup$
    – user64494
    Commented Nov 2, 2023 at 7:05

1 Answer 1

3
$\begingroup$
Graphics3D[{Sphere[{0, 0, 0}], {Red, Sphere[{1, 0, 0}, 1]}, Sphere[{2, 0, 0}, 1]}]

EDIT:

By the way the default color is White.

So you can do it also like this (replacing your Automatic with White):

Graphics3D[{Sphere[{0,0,0}], Red, Sphere[{1, 0, 0}, 1], White, Sphere[{2, 0, 0}, 1]}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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