Week 5 Assignment

by kmaio
See Code Download Embed
This project has five parts.

1) Clicking on the green flag will trigger the code block "Create Waterfall Painting". This code will choose a random location on the stage in front of a waterfall image, match the pen color to the color at that location, and place a dot with the same saturation, hue and brightness. It will then hide the original image, leaving behind an impressionist painting of a waterall.

2) Pressing the space bar will follow the same process as above but with an image of a volcanic eruption 

3) Clicking the "Collect Paint Samples and Graph" code block after one of the first two paintings are created will fill a list called "Sampled Colors" with 100 empty slots, go to a random location on the painting, and add 1 to the index in the "Sampled Colors" list with the same value as the hue at the pen's location. The code will then clear the stage and create a color graph of all the colors in that image. 

4) Clicking the "Make Fiery Color Palette" after creating the volcano impressionist painting will also sample all the colors from the painting, but then it will choose the most frequently occuring colors (in this case when the frequency is greater than 19) and place those colors into an empty list called "Fiery Colors".

5) Finally, hitting enter will go through the same process as the first two parts, however, it will create an impressionist painting of the waterfall image with the most common colors of the volcano painting from the "Fiery Colors" list. In addition, a triangle will be placed at each location instead of a dot to add more dimension. Lastly, to make the water better simulate lava, I created a "Make Lava" code block which will check if the current location's saturation is less than 10 and the y-position is less than 103, to find the white-colored water of the waterfall, and it wil change the color to red. 

Created September 26, 2022

Last updated September 26, 2022

Shared September 26, 2022