Question: Question: Code from book: Modify FractalGrammars.java program (page 259 of the textbook), so that when the curve turns 90 degrees, it will draw a rounded

Question:

Question: Code from book: Modify FractalGrammars.java program (page 259 of the textbook),

Code from book:

so that when the curve turns 90 degrees, it will draw a

rounded corner, like the Dragon curve in Figure 8.4 (page 256 of

the textbook). Name your file "curves.java". Another example that you could test

is a variation of Koch curve, with the grammar defined as (F-F-F-F,

FF-F-F-F-F-F+F, ni, nil, nil, 90) The second generation image showing rounded corners

Modify FractalGrammars.java program (page 259 of the textbook), so that when the curve turns 90 degrees, it will draw a rounded corner, like the Dragon curve in Figure 8.4 (page 256 of the textbook). Name your file "curves.java". Another example that you could test is a variation of Koch curve, with the grammar defined as (F-F-F-F, FF-F-F-F-F-F+F, ni, nil, nil, 90) The second generation image showing rounded corners can be found in the attached file "RoundedCorners.png" Bonus (5 points): Add green leaves to the branches, and orient the leaves in the same direction as the branches. The Bonus part should be implemented in the same program "curves.java". Add a comment to the top of the program stating that you have implemented the bonus part

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!