In this project you will implement Julia sets and subdivision of curves and surfaces.

**Project Specifications**
* Julia Sets:* Draw Julia sets for a bitmap
of size say 200x200 pixels. Use the function f(z) = z

By increasing the maximum number of iterations you should get more accurate Julia sets. Grab the image of an interesting Julia set that you generated.

* Quadratic Spline Curves:* This should be specified by a
sequence of control points entered using mouse clicks. There should be
at

least three control points. On each line segment so formed, add two new control points such that the line segment is subdivided into three segments of equal length. For each previous control point, connect the two new control points closest to it on adjacent segments and obtain a new polyline or polygon as shown below. Repeatedly apply this subdivision rule on the new polyline/polygon until you obtain a smooth polyline/polygon display.

* Smooth Surfaces:* To generate smoothed 3D polyhedron, you
should implement the classic Catmull-Clark recursive subdivision scheme
covered in class. In addition, note that if you have

Here are some files of simple polyhedra that you can work with. Here is a note on the format followed in these files. Before you start doing sub-divisions, make sure you know how to display 3D polyhedra in OpenGL.

You should be able to display the result of the subdivision steps by using a key or the mouse, so that the change in the curve or surface is evident after every subdivision step. Furthermore, the user interface in your program should include a sub-menu which can toggle the drawing between Julia set, curve and surface cases. You may start the project using the programming structure of OpenGL and GLUI from the previous projects.

**Questions Related to the Project **(20% of the project score)

1. Why does the Julia set image become more and more accurate as the
maximum number of iterations is increased?

2. Give one similarity and one difference between recursive subdivisions
and fractals in the way they generate objects?

3. What are the limit shapes of the above curve and surface recursive
subdivisions for a square, a rectangle and a cube?

**What and how to submit**

Your program should compile and run on the Taylor or Painter basement
machines. Then submit the following files:

- Source code
- Executable
- README
- Report
- Image of a Julia set
- Makefile

The report should also be a plain text file which should contain the answers to the above "Questions Related to the Project". In addition, if appropriate, you may also write about what new ideas you came up with, what design decisions you took etc.; please keep such a discussion short and to the point.

You should grab the image of an interesting Julia set you generated. You may do this by using xv command on Taylor/Painter basement machines. Save it as gif or jpeg file. Here is a note on how to grab a window using xv.

Turnin your project to:
*rjkate cs354-project3*

Here is a note on how to use turnin
program.

**OpenGl Reference book**

Neider, Davis and Woo, "OpenGL Programming Guide" Second Edition, Addison-Wesley