Project Specifications
Julia Sets: Draw Julia sets for a bitmap
of size say 200x200 pixels. Use the function f(z) = z2+ c, make
arrangement to interactively set the value of c and the maximum number
of iterations. Fix the "blowup parameter". Then for each pixel z = (x,
y) from your bitmap do the following: repeatedly calculate f(z) each time
making making f(z) as the new value of z (i.e. f(z), f(f(z)), ...). Stop
when |f(z)| becomes larger than your "blowup parameter" or when you complete
the maximum number of iterations. Now set the color of the point (x,y)
according to the number of iterations you performed.
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 extraordinary vertices in the quadrilateral mesh (a vertex is extraordinary if the number of vertices connected to it is not equal to four) then the given vertex rule does not apply. In this case, instead of weights 1/64, 3/32 and 9/16, use weights: 1/4n2, 3/2n2, and 1-3/2n-1/4n, where n is the number of vertices it is connected to.
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:
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