Added functions to draw 3D primitives