This addition fixes bug #2 . We can now get rid of the dimension hash map because reasonable chunk size should yield the expected result. (Choosing (5,500) or similar extreme values might give some unexpected visual artifacts). The mutation is now always applied, but is reverted if a mutated outside vertex was sent back inside the screen (producing black triangles).
Another way of fixing this problem could have been to have two different mutation functions (mutate_x, mutate_y) and apply both them on the vertices inside the screen, but apply only one of them to the vertices outside the screen.
This addition fixes bug #2 . We can now get rid of the dimension hash map because reasonable chunk size should yield the expected result. (Choosing
(5,500)
or similar extreme values might give some unexpected visual artifacts). The mutation is now always applied, but is reverted if a mutated outside vertex was sent back inside the screen (producing black triangles).Another way of fixing this problem could have been to have two different mutation functions (
mutate_x
,mutate_y
) and apply both them on the vertices inside the screen, but apply only one of them to the vertices outside the screen.