Question: All code should be in Python 3. Assignment Your task is to write a Python program that uses recursion to generate random art in a

 All code should be in Python 3. Assignment Your task is

All code should be in Python 3.

to write a Python program that uses recursion to generate random art

in a Mondrian Python Turtle to draw the art. B encompassing the

Assignment Your task is to write a Python program that uses recursion to generate random art in a Mondrian Python Turtle to draw the art. B encompassing the overall dimensions of the piece of art. Then use recursion to s style. Your program is to use the elow is a general strategy you can use to generate art in a Mondrian style. Start with a rectangle plit the rectangle into smaller rectangles. If the rectangle's width greater than half of the overall width: set make-horizontal-split to true Else If the rectangle's height is greater than half of the overall height: set make-vertical-split to true Else: set make-horizontal-split randomly (see below) set make-vertical-split randomly (see below) If make-horziontal-split and make-vertical-split: Else If make-horizontal-split: Else If make-vertical-split: split the rectangle both horizontally and vertically (see below) split the rectangle horizontally (see below) split the rectangle vertically (see below) No split will be made, draw the rectangle filled with a random color (see below) Else: Here are a couple of images generated using this algorithm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!