Coursework

Submission Date: February 10th 2012 at 11:55pm (11:55pm)


The URL of this document is http://www.cs.ucl.ac.uk/staff/J.Kautz/teaching/2011/CW2011/
You should refer to the web page for the links to code and other documents.

Submission Process:

You need to hand in your code on Moodle. Make sure to include the source code, as well as the compiled code. Include a detailed README-file detailing what you have (or haven't) done.

Marking:
This coursework is compulsory. This coursework is worth 5% of the final mark for 2011. There are 2.5 marks per question.


Q1. Bezier Curves

The following example allows you to interactively control a bezier curve by dragging the control points Cubic.java

Replace the call to draw the cubic shape (big.draw(cubic)), by your own function to draw a bezier using the recursive split method (use your own implementation and not Java2D's curve drawing methods). Finally, add the ability to create a longer Bezier curve by adding more control points to create a second curve.

Important Note: Submit the source, the compiled code, as well as cubic.html. Make sure your program can be started with: appletviewer cubic.html


Q2. Hierarchical Animation

Copy the TransAnim example that shows an animation of an AffineTransformation and study how it works. Write an application that animates the following (somewhat bizzare) mini solar system:


The elliptical blue plant is rotating about itself and around the sun. The elliptical moon is rotating about itself (note the direction) and around the earth. This will involve a hierarchical transformation, as described in the lecture. Make the solar system animate.

Hint: Note that the AffineTransformation class has rotate and translate methods that concatenate the current transformation together with another transformation.

Important Note: Submit the source, the compiled code, as well as transanim.html. Make sure your program can be started with: appletviewer transanim.html


Jan Kautz, January 26th, 2012