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


PROC DrawCuboid(CARD x,y BYTE w,h,d)
  BYTE wsize=[10],hsize=[10],dsize=[5]
  BYTE i
 
  FOR i=0 TO w
  DO
    Plot(x+i*wsize,y+h*hsize)
    DrawTo(x+i*wsize,y)
    DrawTo(x+i*wsize+d*dsize,y-d*dsize)
  OD
  FOR i=0 TO h
  DO
    Plot(x,y+i*hsize)
    DrawTo(x+w*wsize,y+i*hsize)
    DrawTo(x+w*wsize+d*dsize,y+i*hsize-d*dsize)
  OD
  FOR i=1 TO d
  DO
    Plot(x+i*dsize,y-i*dsize)
    DrawTo(x+w*wsize+i*dsize,y-i*dsize)
    DrawTo(x+w*wsize+i*dsize,y+h*hsize-i*dsize)
  OD
RETURN
 
PROC Main()
  BYTE CH=$02FC,COLOR1=$02C5,COLOR2=$02C6
 
  Graphics(8+16)
  COLOR1=$0C
  COLOR2=$02
  Color=1
 
  DrawCuboid(60,45,2,3,4)
  DrawCuboid(130,40,2,4,3)
  DrawCuboid(205,50,3,2,4)
  DrawCuboid(55,120,3,4,2)
  DrawCuboid(120,130,4,2,3)
  DrawCuboid(200,125,4,3,2)
 
  DO UNTIL CH#$FF OD
  CH=$FF
RETURN