Recursion in C++
Not what you're looking for?
Write a program use C++ language with Recursion algorithm to do this exercise. Prefer compile with Visual C++ or DevC Snowflake.h and image included in attachment file.
19. What changes have to made in the program in snowflake.h to draw a line as in file fig521.jpg? Try it and experiment with other possibilities to generate other curves.
Purchase this Solution
Solution Summary
A recursive program in C++ is enhanced to draw snow flake.
Solution Preview
Changes in SZ.ZIP.
1. vonKoch() function is modified to accept starting position point:
vonKoch::vonKoch(int s, int lvl, CDC *pDC, CPoint &pt) ;
2. "else" branch in drawFourLines() changed as follows:
drawFourLines(side/3,level-1);
left (90);
drawFourLines(side/3,level-1);
right(90);
drawFourLines(side/3,level-1);
...
Purchase this Solution
Free BrainMass Quizzes
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
C# variables and classes
This quiz contains questions about C# classes and variables.
Javscript Basics
Quiz on basics of javascript programming language.
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.