Stuck on the snowflake portion of Snowflakes in the Ice. The first rotation works fine, but I can’t get it to do the rest of the rotations. My code is
def flake(start, end): # To create a hexagonal flake we need to create 6 line fractals rotated by 60 degrees each time. side = Vector.subtract(end, start) a = start b = end for i in range(6): line(a, b) # To get the next edge, we need to rotate the side 60 degrees. rotation = Vector.rotate(side, degreesToRadians(60)) # Now need to reset a and b with the beginning and end points for the new side. a = b b = Vector.add(rotation, a)`
Obviously I have to use the i variable somewhere, but for the life of me I cannot figure out how or where. I know correct code isn’t given out on the forums, but can someone give me a hint?