Monday, July 25, 2011

Programming Week Two - Rotation repetition


 Furthering the algorithm, the next stage was to work on the repetition of the form. In order for this to be achieved within a while() loop, I had to determine a way to rotate the entire form to an additional angle to that contained within the initial form.

The initial results were a failure, with the rotation code being an addition to the code within the initial form: rotate(PI/4 + rot) where 'rot' is a float determined earlier as the angle that each rotation shall occur upon. Eventually, the obvious and yet missed coding direction was found, which placed the rotate(rot) code outside the forms while() loop, and into the repetition loop.

No comments:

Post a Comment