For a sphere, we generate N points on the surface based on ɸ azimuthal angles (= resolution + 1) times θ polar angles (= resolution + 1). For a cylinder, we first generate N points (= resolution + 1) uniformly distributed points between a start position vector and an end position vector. These points form the centers of circles that outline the body of the cylinder. For every circle, we generate N points (= resolution) on the circumference. We cap the cylinder with either no cap or a round cap. The round cap is created by generating points for half a sphere on either end of the cylinder.