function [G, h] = voronoi(v)
K = length(v);
n = length(v{1});
G = {};
h = {};
for i = 1:K
  for j = 1:K
    a = v{i} - v{j};
    b = a'*(v{i} - v{j})/2;
    G = [G; a'];
    h = [h; b];
  end
end
