Figure 4: Computation of weight factors
a
and
b