A Koch curve is a jagged line whose exact shape is defined by the following recursion (also see Figure 15.5):
● (Base Case) An order 0 Koch curve is a straight line, as illustrated in Part B of Figure 15.5.
● (Recursive Case) An order n Koch curve is created by replacing every straight line in an order n – 1 Koch curve with four lines as shown in Part A of Figure 15.5. Each new line is one-third as long as the line from the order n – 1 curve, and the angles between the new lines are as shown in the figure. The first and last of the new lines head in the same direction as the line from the order n – 1 curve.
For example, Part B of Figure 15.5 illustrates order 0, order 1 and order 2 Koch curves.
Design and code an algorithm for drawing Koch curves. Your algorithm should take the order of the curve as a parameter. You may use a line-drawing class such as the one introduced in this section in your design.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more