Added handling of an odd number rows in the capsule rendering and primitive calculation.