A good data sampling scheme is important for diffusion MRI acquisition and reconstruction. Diffusion Weighted Imaging (DWI) data is normally acquired on single or multiple shells in q-space. The samples in different shells are typically distributed uniformly, because they should be invariant to the orientation of structures within tissue, or the laboratory coordinate frame. The Electrostatic Energy Minimization (EEM) method, originally proposed for single shell sampling scheme in dMRI by Jones et al., was recently generalized to the multi-shell case, called generalized EEM (GEEM). GEEMhas been successfully used in the Human Connectome Project (HCP). Recently, the Spherical Code (SC) concept was proposed to maximize the minimal angle between different samples in single or multiple shells, producing a larger angular separation and better rotational invariance than the GEEM method. In this paper, we propose two novel algorithms based on the SC concept: 1) an efficient incremental constructive method, called Iterative Maximum Overlap Construction (IMOC), to generate a sampling scheme on a discretized sphere; 2) a constrained non-linear optimization (CNLO) method to update a given initial scheme on the continuous sphere. Compared to existing incremental estimation methods, IMOC obtains schemes with much larger separation angles between samples, which are very close to the best known solutions in single shell case. Compared to the existing Riemannian gradient descent method, CNLO is more robust and stable. Experiments demonstrated that the two proposed methods provide larger separation angles and better rotational invariance than the state-of-the-art GEEMand methods based on the SC concept.