Random Cloud Generator using Python

cloudCan computers produce artwork? In this challenge we are looking at how to write a piece of code to generate a “pretty” graphic.

Our first script will generate a random cloud on a blue sky by drawing several (15 in total) white circles of different sizes and position on the canvas. It uses the randomize library to randomly alter the size and position of these circles.

Your Challenge


Use a similar script to generate a random forest as follows:

forest

Extended Challenge


How could you change your script so that each tree has a different shade of green:

forest2

Did you like this challenge?

Click on a star to rate it!

Average rating 3.8 / 5. Vote count: 5

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: ,