Next up was the rotation. This was the first real challenge, and took many iterations to work out, including attempts at the use of the pushMatrix() and pullMatrix() codes, however in the end it was as simple as the code: translate(width/2, length/2). This moved the origin point, around which all rotation occurred, to the centre of the canvas. Further, by substituting width and length with fixed integers, the position of the origin, and so the entire pattern, can be anywhere desired on the canvas.
No comments:
Post a Comment