convex combinations in JS

This plots random convex combinations of the points you add with the mouse on the canvas below.

Is there a way to modify the random distribution so that the points are evenly distributed, at least up to three corners?