Finalized the calculateDrawPositions() function. Added some test cases and documentation.