timozattol / wallpaper-generator

A simple wallpaper generator written in python
MIT License
31 stars 2 forks source link

Fix lattice dimension bug #8

Closed tyrann closed 8 years ago

tyrann commented 8 years ago

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.

tyrann commented 8 years ago

This is still not fixed. It still has problems on the right edge for certain values.

tyrann commented 8 years ago

Yes, in order for this to work we need to change the vertex creation to take the chunk_size into account.