Question: DragonCurve.java Draw the dragon curve using Turtle API . The program has to ask the user to enter the iteration, the length of each segment
DragonCurve.java
Draw the dragon curve using Turtle API . The program has to ask the user to enter the iteration, the length of each segment in the curve and if the user would like to display the string of the dragon curve in terms of r/l. The program should display the string of the curve if the user entered yes and print the curve using Turtle API. You should assume that the initial state of the curve is a horizontal line. If the user enter iteration 2, then the string will be pre a program to write the instructions for drawing a dragon curve of a string of order n. ThThe instructions are strings rrl, which means R F R F L F, where the F means "draw line while moving segment unit forward", L means "turn left", and R means turn right.


Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
