Butterflies On Flowers

Mini-project for university course "Information Visualization".

We will create a drawing area and sketch 10 flower silhouettes on it. Subsequently, a JSON file will be generated with a predetermined number of permutations for the numbers from zero to nine. Using this dataset, they will draw 10 butterflies, each in a different color, positioned above the 10 flowers.

Upon pressing the 'right arrow' key, the butterflies will smoothly swap positions, flying to another flower and arranging themselves according to the second permutation. Pressing the 'right arrow' key again will trigger another smooth transition to the third permutation, and so forth. After reaching the last permutation, pressing 'right arrow' will loop back to the first.

Conversely, pressing the 'left arrow' key will smoothly move the butterflies back to their previous positions, transitioning from the first permutation to the last. The position changes of the butterflies will be accompanied by fluid animations for a seamless visual experience.

Butterfly Gif