To compute w1 and w2 for a cam and rocker mechanism a drawing like this can be used. We can see the valve here which is displaced by the vector y, we can see the rocker arm, here you can see the cam and the rocker surface which is defined by the centre which is in this point.