4
$\begingroup$
Graphics3D[
 Cuboid /@ Complement[Tuples[{1, 2, 3}, 3], {{1, 2, 3}, {3, 1, 3}}],
 ViewPoint -> {45.42, -83.46, 31.83}, Boxed -> False]

Above code generates following 3D graphic : enter image description here

Then I want to generate following 3D graphic :
A graphic with white face, and black edge in any view.
Any view means in any view related settings like ViewPoint, ViewVertical, and rotation state.

enter image description here

After that, I want an enhanced version of following 3D graphic :
See the edges in the back look a bit blurry and dirty.
That's why I want its enhanced version - not blurry, not dirty.

enter image description here

Finally I want to give just a little lighting(black and white lighting) to above 3D graphics.
This is necessary because without any lighting, some 3D graphics can be a little confusing.

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

After getting a comment from Vitaliy Kaurov :

Thank you, but the result is

enter image description here

in Mathematica V 13 in my PC.
The graphic has some gray faces. It is not all white.
I want to generate graphics with all white faces in any view.

After getting more comment :

The problem was solved.

$\endgroup$
3
  • $\begingroup$ Sorry, All 3. Black and white images were not created using mathematica only. $\endgroup$ Commented Sep 3, 2023 at 4:46
  • $\begingroup$ I added the example for all white faces. You should study docs on Lighting. $\endgroup$ Commented Sep 3, 2023 at 5:04
  • 1
    $\begingroup$ Graphics3D[{FaceForm[Opacity[.5]], Cuboid /@ Complement[Tuples[{1, 2, 3}, 3], {{1, 2, 3}, {3, 1, 3}}]}, ViewPoint -> {45.42, -83.46, 31.83}, Boxed -> False, Lighting -> {{"Ambient", White}}] $\endgroup$ Commented Sep 3, 2023 at 5:32

2 Answers 2

5
$\begingroup$

I'll offer a few options and by studying their various properties you can make more by combining them or looking up in docs examples for these properties. These all are for your 3rd image. Generally adjusting Opacity and Lighting changes images a lot -- play with that.

Graphics3D[{FaceForm[Directive[Opacity[1], GoochShading[White]]], 
  Cuboid /@ Complement[Tuples[{1, 2, 3}, 3], {{1, 2, 3}, {3, 1, 3}}]},
  ViewPoint -> {45.42, -83.46, 31.83}, Boxed -> False, 
 Lighting -> AmbientLight[White]]

enter image description here

Graphics3D[{FaceForm[Directive[Opacity[.5], GoochShading[White]]], 
  Cuboid /@ Complement[Tuples[{1, 2, 3}, 3], {{1, 2, 3}, {3, 1, 3}}]},
  ViewPoint -> {45.42, -83.46, 31.83}, Boxed -> False, 
 Lighting -> AmbientLight[White]]

enter image description here

Graphics3D[{FaceForm[Directive[Opacity[.5], GoochShading[White]]], 
  Cuboid /@ Complement[Tuples[{1, 2, 3}, 3], {{1, 2, 3}, {3, 1, 3}}]},
  ViewPoint -> {45.42, -83.46, 31.83}, Boxed -> False, Lighting -> "Neutral"]

enter image description here

Graphics3D[{FaceForm[Directive[Opacity[.3], White]], 
  Cuboid /@ Complement[Tuples[{1, 2, 3}, 3], {{1, 2, 3}, {3, 1, 3}}]},
  ViewPoint -> {45.42, -83.46, 31.83}, Boxed -> False, Lighting -> "Neutral"]

enter image description here

Graphics3D[{FaceForm[Directive[Opacity[.1], White]], 
  Cuboid /@ Complement[Tuples[{1, 2, 3}, 3], {{1, 2, 3}, {3, 1, 3}}]},
  ViewPoint -> {45.42, -83.46, 31.83}, Boxed -> False, 
 Lighting -> DirectionalLight[White, {{2.5, 2.5, 5}}]]

enter image description here

Graphics3D[{FaceForm[Directive[Opacity[.1], White]], 
  Cuboid /@ Complement[Tuples[{1, 2, 3}, 3], {{1, 2, 3}, {3, 1, 3}}]},
  ViewPoint -> {45.42, -83.46, 31.83}, Boxed -> False, 
 Lighting -> 
  SpotLight[White, {{2.5, 2.5, 15}, {2.5, 2.5, 2.5}}, Pi/3]]

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Thank you, four examples were helpful, but it was not possible to generate 3D graphics with all white faces in any view. (with Opacity = 0 or 1). $\endgroup$ Commented Sep 3, 2023 at 4:54
  • $\begingroup$ @imidak i just added a 1st example of that. please try experimenting with properties and read the docs. $\endgroup$ Commented Sep 3, 2023 at 5:03
  • $\begingroup$ Thank you, the problem was solved with the first code of updated answer. $\endgroup$ Commented Sep 3, 2023 at 5:06
3
$\begingroup$
$Version

(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)

Clear["Global`*"]

cubes = Cuboid /@ Complement[
    Tuples[{1, 2, 3}, 3], {{1, 2, 3}, {3, 1, 3}}];

Graphics3D[{
  AmbientLight[White],
  EdgeForm[{Black, AbsoluteThickness[1]}],
  cubes},
 ViewPoint -> {45.42, -83.46, 31.83},
 Boxed -> False]

enter image description here

Graphics3D[{
  Opacity[0],
  EdgeForm[{Black, AbsoluteThickness[1]}],
  cubes},
 ViewPoint -> {45.42, -83.46, 31.83},
 Boxed -> False]

enter image description here

Graphics3D[{
  AmbientLight[Black],
  Opacity[0.02],
  EdgeForm[{Black, AbsoluteThickness[1]}],
  cubes},
 ViewPoint -> {45.42, -83.46, 31.83},
 Boxed -> False]

enter image description here

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.