Seems to work. The inside and outside bounce utilize the same formula.
Actually, I got caught up on this one for a while and thought I'd have
to refigure the bounce formula, again. But it turns out that when I
inserted the formula (rather than making a method, because I wasn't
convinced the same formula would work), I neglected to update the
variables. So, I was switching back and forth between the inside and
outside circle when it bounced off the inside circle. Too much effort
to go back and recreate the mistake (and not really all that visually
interesting).
I went to a circle to bypass the corner edge condition of the OctoGon.
Factoring the function BallBounce(){} is clearly the next thing to do.
Previous Brett Code Index Next in Series
Copyright © 2013 Brett Paufler