Question: PS1: Recursive Graphics (Pythagoras tree) In this assignment you will write a program that plots a Pythagoras tree (with and without recursion), as illustrated below.

 PS1: Recursive Graphics (Pythagoras tree) In this assignment you will writea program that plots a Pythagoras tree (with and without recursion), as

PS1: Recursive Graphics (Pythagoras tree) In this assignment you will write a program that plots a Pythagoras tree (with and without recursion), as illustrated below. Then, write a program that will plots an asymmetric Pythagoras tree using rectangle as a base. The Pythagoras tree is named after the Greek mathematician Pythagoras because each triple of touching squares encloses a right triangle, in a configuration traditionally used to depict the Pythagorean theorem. It is a plane fractal constructed from squares invented by the Dutch mathematics teacher Albert E. Bosman in 1942. In 1957 Bosman published a book on Het wondere onderzoekingsveld der lakke meetkunde ('the wondrous exploration field of plane geometry) that contained a description of the Pythagorean tree. If the largest square has a size of L L, the entire Pythagoras tree fits snugly inside a box of size 6L x 4L. Your task is to write a program PTree.cpp with a recursive function pTree(), and a main() program that calls the recursive function. Your program shall take two command-line arguments L and N: L size of the base square (double) N the depth of the recursion PS1: Recursive Graphics (Pythagoras tree) In this assignment you will write a program that plots a Pythagoras tree (with and without recursion), as illustrated below. Then, write a program that will plots an asymmetric Pythagoras tree using rectangle as a base. The Pythagoras tree is named after the Greek mathematician Pythagoras because each triple of touching squares encloses a right triangle, in a configuration traditionally used to depict the Pythagorean theorem. It is a plane fractal constructed from squares invented by the Dutch mathematics teacher Albert E. Bosman in 1942. In 1957 Bosman published a book on Het wondere onderzoekingsveld der lakke meetkunde ('the wondrous exploration field of plane geometry) that contained a description of the Pythagorean tree. If the largest square has a size of L L, the entire Pythagoras tree fits snugly inside a box of size 6L x 4L. Your task is to write a program PTree.cpp with a recursive function pTree(), and a main() program that calls the recursive function. Your program shall take two command-line arguments L and N: L size of the base square (double) N the depth of the recursion

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!