canvas 1000 800 # 3D Shapes linecolor blue linewidth 2 cube3d -100 -50 0 size=50 linecolor red pyramid3d -120 50 0 base=40 height=60 # --- 2D Shapes ported to 3D --- # All shapes are drawn on a plane parallel to the XY plane # A line from the pyramid's apex to a point in space linecolor purple linewidth 1 line -100 70 60 0 0 80 # A green square at z=20 linecolor green square 20 20 20 size=40 # A gold sphere linecolor gold linewidth 1 sphere 50 -50 40 radius=30 # An orange rectangle at z=0 linecolor orange rect 20 -60 0 w=50 h=30 # A black circle floating at z=70 linecolor black circle -50 -50 70 r=30 # A cyan ellipse below the cube linecolor cyan ellipse -75 -25 -10 w=60 h=20 # A magenta triangle linecolor magenta triangle 10 -20 0 size=30 # A brown hexagon linecolor brown polygon 60 60 0 sides=6 radius=25 # Text placed in 3D space fontcolor darkred text "CAD3D" -20 -80 0 text "Top" -100 70 75