I’m trying to create some works by Vera Molnar in Processing to get a better understanding of how to use it. This is the piece I am trying to recreate:
All the rotate(); function knows is how much to rotate it by. rotate always rotates the shapes from an origin of (0, 0), so when you draw a line with one point at (0, 0), and one with (0, 40) the point at (0, 0) doesn’t change, but the (0, 40) rotates around the origin. Then the line would get translates to (i, 5).
Luckily there is an easy solution for this. You can draw the line to the center of the line is at (0, 0), so the lines points will be (0, -20, 0, 20). Here is an example of that: