0

enter image description here

Hello, I'm new in learning Tikz. I'd appreciate if someone could code this:

1

1 Answer 1

0

I just add an Asymptote figure for comparison with existing answers. I was drawing with a 2x2x2 cube - my son's toy - on my desk, copying colors from it ^^ It seems the lights need to be improved more to show that true colors??? (I appreciate any help about this!).

enter image description here

// http://asymptote.ualberta.ca/
import three;
unitsize(1cm);
currentprojection=orthographic(3, 2, 2,zoom=.8,center=true);
light White=light(new pen[] {rgb(0.38,0.38,0.45),rgb(0.6,0.6,0.67),
                             rgb(0.5,0.5,0.57)},specularfactor=3,
  new triple[] {4X,4Y,4Z});
currentlight=White;

surface p=scale3(2)*unitplane;
draw(shift(0,0,2)*p,yellow);
draw(p,lightgray);
draw(rotate(-90,Y)*p,red);
draw(shift(2,0,0)*rotate(-90,Y)*p,orange);
draw(rotate(90,X)*p,green);
draw(shift(0,2,0)*rotate(90,X)*p,blue);
path3[] lines=box((1,0,0),(1,2,2))^^
              box((0,1,0),(2,1,2))^^
              box((0,0,1),(2,2,1));
draw(scale3(2)*unitbox^^lines,black+1.5pt+opacity(.5));

From another view

enter image description here

PS: Here is my son's 2x2x2 cube ^^

enter image description here

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