function P = get_patterns(name)

  % Returns patterns (bit quads) associated with name

  if strcmp(name,'pixel')
    P = {1};
  elseif strcmp(name,'hor')
    P = {[0, 1]};
  elseif strcmp(name,'ver')
    P = {0, 1};
  elseif strcmp(name,'Q0')
    P = {[0,0;0,0]};
  elseif strcmp(name,'Q1')
    P = {[1,0;0,0], [0,1;0,0], [0,0;0,1], [0,0;1,0]};
  elseif strcmp(name,'Q2')
    P = {[1,1;0,0], [0,1;0,1], [0,0;1,1], [1,0;1,0]};
  elseif strcmp(name,'Q3')
    P = {[1,1;0,1], [0,1;1,1], [1,0;1,1], [1,1;1,0]};
  elseif strcmp(name,'Q4')
    P = {[1,1;1,1]};
  elseif strcmp(name,'QD')
    P = {[1,0;0,1], [0,1;1,0]};
  end