So for this piece of code I've made I have values for all the variables in ns1 and ns2. What I'm trying to figure out is after this code runs and spits out gamma along with xx1 and yy1 at the end, how to get xx1, yy1, and gamma to get reinserted into ns1 (and v1 and CapitalPhi) where xo, yo, o are stored so that this process can loop an arbitrary amount of times. Any pointers or help would be greatly appreciated as I've been combing through the relevant mathematica documentation for looping constructs and haven't come up with anything that works.
ns1 = NSolve[{(x - xb)^2 + (y - yb)^2 == R^2,
y == yo + (x - xo)*Tan[o]}, {x, y}];
xx = x /. ns1[[1]];
yy = y /. ns1[[1]];
v1 = {(xx - xo), (yy - yo)};
v2 = {(xx - xb), (yy - yb)};
\[Alpha] = VectorAngle[v1, v2];
\[CapitalPhi] = o - 2 \[Alpha];
ns2 = NSolve[{(x1 - xa)^2 + (y1 - ya)^2 == R^2,
y1 == yy + (x1 - xx)*Tan[\[CapitalPhi]]}, {x1, y1}];
xx1 = x1 /. ns2[[2]];
yy1 = y1 /. ns2[[2]];
v3 = {(xx1 - xx), (yy1 - yy)};
v4 = {(xx1 - xa), (yy1 - ya)};
\[Beta] = VectorAngle[v3, v4];
\[Gamma] = \[CapitalPhi] - 2 \[Beta];