Blood vessels form either when dispersed endothelial cells (the cells lining the inner walls of fully formed blood vessels) organize into a vessel network (vasculogenesis), or by sprouting or splitting of existing blood vessels (angiogenesis). Although they are closely related biologically, no current model explains both phenomena with a single biophysical mechanism. Most computational models describe sprouting at the level of the blood vessel, ignoring how cell behavior drives branch splitting during sprouting. We present a cell-based, Glazier-Graner-Hogeweg model (also called Cellular Potts Model) simulation of the initial patterning before the vascular cords form lumens, based on plausible behaviors of endothelial cells. The endothelial cells secrete a chemoattractant, which attracts other endothelial cells. As in the classic Keller-Segel model, chemotaxis by itself causes cells to aggregate into isolated clusters. However, including experimentally observed VE-cadherin-mediated contact inhibition of chemotaxis in the simulation causes randomly distributed cells to organize into networks and cell aggregates to sprout, reproducing aspects of both de novo and sprouting blood-vessel growth. We discuss two branching instabilities responsible for our results. Cells at the surfaces of cell clusters attempting to migrate to the centers of the clusters produce a buckling instability. In a model variant that eliminates the surface-normal force, a dissipative mechanism drives sprouting, with the secreted chemical acting both as a chemoattractant and as an inhibitor of pseudopod extension. Both mechanisms would also apply if force transmission through the extracellular matrix rather than chemical signaling mediated cell-cell interactions. The branching instabilities responsible for our results, which result from contact inhibition of chemotaxis, are both generic developmental mechanisms and interesting examples of unusual patterning instabilities.