Task

Draw a   cuboid   with relative dimensions of    2 × 3 × 4. 



The cuboid can be represented graphically, or in   ASCII art,   depending on the language capabilities.

To fulfill the criteria of being a cuboid, three faces must be visible.

Either static or rotational projection is acceptable for this task.



Related tasks
 draw a sphere
 draw a rotating cube
 write language name in 3D ASCII
 draw a Deathstar


 
(use 'quil.core)
 
(def w 500)
(def h 400)
 
(defn setup []
  (background 0))
 
(defn draw []
  (push-matrix)
  (translate (/ w 2) (/ h 2) 0)
  (rotate-x 0.7)
  (rotate-z 0.5)
  (box 100 150 200)  ; 2x3x4 relative dimensions
  (pop-matrix))
 
(defsketch main
  :title "cuboid"
  :setup setup
  :size [w h]
  :draw draw
  :renderer :opengl)
 