Task
Draw a rotating cube.

It should be oriented with one vertex pointing straight up, and its opposite vertex on the main diagonal (the one farthest away) straight down. It can be solid or wire-frame, and you can use ASCII art if your language doesn't have graphical capabilities. Perspective is optional.




Related tasks
 Draw a cuboid
 write language name in 3D ASCII


 
  % Title "Rotating Cube"
  % Animated
  % PlaceCentral
  uses ConsoleG
 
  sub main
  ========
  cls 0.0, 0.5, 0.7
  shading
  scale 7
  pushstate
    GoldMaterial.act
    static float ang
    rotateX ang
    rotateY ang
    go cube
  popstate
  ang+=.5 : if ang>=360 then ang-=360
  end sub
 
  EndScript
 