Homeworks
Homework 7 (Due on 5 Dec)
PDF | Solutions | Splines of solution
FAQ:
- No updates yet!
Homework 6 (Due on 7 Nov. 2pm)
PDF | Framework (v.3) | Test Images | Solution
Setting up & Running the framework
- Extract the framework ZIP file into a project root folder, so it's laid out
as follows:
<project root> dlls/ jars/ resampler/ - Create the project in Eclipse: File -> New -> Java Project -> Choose "Create project from existing source" and set "Directory" to <project root>. Name it something, such as "resampler"
- Right click on the project in the package explorer -> Build Path -> Configure Build Path… -> Java Build Path -> Libraries -> Add JARs… -> expand your project, expand "jars", highlight all three, and click OK. The three JARs might have already been added to the Build Path so probably you don't need this step.
- Make a Run configuration for MainFrame
- Under the Run... menu, go to the Arguments tab.
- In the VM Arguments pane, put the following:
-Djava.library.path=./dlls/
This tells java how to find the JOGL (Java OpenGL, pronounced "joggle") dlls it needs to run the program. If you are running under Linux or MacOS, you might need to download the library from JOGL's website and put files under appropriate library.
Screenshots:
FAQ:
- Q: What do the variables in AxisAlignedResampler.resample mean?
A: dxO, dyO, oxO and oyO define a transformation from a point in the output image to its corresponding point in the input image. To be more specifically, a point (x, y) in the output image corresponds to the point (dxO*x+oxO, dyO*y+oyO) in the input image. On the other hand, xlN, xhN, ylN and yhN define the region of the output image in which we compute and fill in the pixel values; they represent the lower bound and higher bound in horizontal and vertical direction, respectively. - Q: The "clip to destination" is turned on by default but the menu item is "No clipping"?
A: Sorry it is a bug of the framework. To fix it, change line 153 of MainFrame.java from "menuRepeatMode.setSelected(true);" to "menuClampMode.setSelected(true);". The framework v3 fixes the problem.
Homework 5 (Due on 17 Oct)
PDF (v.2) | Solutions | Rasterizer MATLAB script
FAQ:
- No updates yet!
Homework 4 (Due on 26 Sep)
FAQ:
- No updates yet!
Homework 3 (Due on 19 Sep)
FAQ:
- No updates yet!
Homework 2 (Due on 12 Sep)
FAQ:
- Q: Where are E and F in figure 1?
A: E and F are two vertices on the bound of the view as shown in figure 2; so by saying EF I mean the width of the view. Since they are not fixed points in the scene, I didn't draw them in figure 1. Actually I put EF in figure 2 just to conveniently indicate how large the view is relative to the image of the cube. Finally, note in AB:CD:EF I mean the lengths AB,CD and EF in figure 2, in fact, AB:CD=1:1 in figure 1. - Q: Then what's the height of the view?
A: We assume the view is square, which means the height of the view equals EF. - Q: What are some assumptions we can make for 2d?
A: 1) Assume the viewer is 8ft above the water. 2) Assume that the boat subtends the same angle as the sun (ie. 0.5 degrees). So if you were looking directly at the bottom of the boat, and then tilted your head up 0.5 degrees, you'd be looking at its top. (NOTE: Assuming (2) does not give you the exact answer, since subtending the same angle does not imply having the same projected height, but makes the problem much simpler.)
Homework 1 (Due on 4 Sep)
PDF | Solutions | Gamma Correction Applet | Gamma.java (In case the applet does not work)
FAQ:
- Q: What if I can't find the color depth and the refresh rate of the display?
A: If the OS does not show the color depth explicitly, use 24 bits per pixel; if the refresh rate can't not be found, use 60Hz. - Q: What if the stripes never blend together, or the grey patch never blend with the surrounding areas? Can I use other tools instead?
A: If you can't find a pixel value that makes two parts looks perfectly the same, just find a value that matches the best. Feel free to use any other tools as long as you write in the homework the way you determine the gamma value. - Q: What is the relative difference?
A: The relative difference of two positive values A and B (A>B) is (A-B)/B=A/B-1. Note in Q3 and Q4 we are all talking about the relative difference. - Q: I am confused by the "intensities" in Q3.
A:The observed intensity consists of two components, one is the view flare, Imin, which is denoted by k in the slides (sorry for using the wrong symbol -- Kan), and the other one is the intensity from the display, which ranges from 0 to Imax. We need to calculate the relative difference based on the observed intensity. - Q: Do greater values of precision mean to be more "precise"? Or is it the opposite?
A: The opposite, i.e. 1% of "precision" is more "precise" than 2%. Intuitively, more levels means more "precise", which leads to smaller value of "precision".



