Assignment 1 - Drawing a fractal curve
Your task is to write a simple OpenGL program that draws a recursive curve.
More precisely, you should draw one of the quadratic variants of the
which (at each level of recursion) takes each straight segment and
replaces it with 8 segments, each
of which has 1/4 length of the original segment. For an illustration,
see the image below, which shows the first 3 levels of recursion.
The program should show the various levels of recursion successively,
so that each level is clearly visible. You must show at least 6 levels.
The level of the recursion should change with each mouse click.
Your program must run correctly in the Linux machines in the PRISM lab.
You should call your source file a1.c and also submit the
Makefile you have been using.
Please submit the program with the following command:
submit 3431 a1 [files]
are the names of the files you are submitting.
- For more background on recursive curves see Ex. 2.6 on page 96 of the textbook. Alternatively, you can look at the set of slides that was covered on Jan 20 in class, but the slides explain much less detail. The PowerPoint file is available on the WWW site for the textbook and is called AngelCG06.ppt.
- A simple OpenGL program can be found in /cs/course/3431/examples/interactive.c. There is also an example Makefile available in the same location.