Problem Description:
The goal of this project is to learn basics of vector to raster conversion and antializing.
You will also learn how to desribe images using mathematical functions. There will be three tasks:
an half-plane, a circle, and a shape decribed by a polynomial.
They will all be created using antialiasing. For antialiazing, we will use
"uniform jitter" sampling idea
developed by "Ramamoorthi et al." in the paper "A Theory of Monte Carlo Visibility Sampling", ACM Transactions on Graphics 31(5).
The requirements are listed below. You can still base your code from a fully
functional program called pr01.cpp that displays a yellow image.
A makefile can be downloaded here.
Summary of minimum requirements:
Your program(s) should create at least one half-plane, one circle, a shape defined by a
function in the form of f(x,y)<0. You can choose any color and any shape.
We also want to see close-up images that demonstrate that
the antialising is working. Example images are shown below.
Put your resulting images to your website. Do not use any high level operation
such as ``draw a polygon''. For the required parts of the project, implement your operations
only using the basic programming operations such as while or
for loops and basic mathematical operations such as
addition, subtraction, multiplication, division and power.
Using your program, you should be able to all possible half-planes. Note that the form
"y=mx+n" does not provide all possible half-planes. "ax+by+c=0" can provide but you will not know about
your line just by looking at parameters. If you use any of these two forms,
your project will be returned back to be corrected. Instead, use either the form "cos theta (x-x0) + sin theta (y-y0)" or
n dot (p-p0) where n=(cos theta, sin theta).
The boundary of these half-spaces will be perpendicular of n and pass through from the point p0=(x0,y0).
Project Submission:
Please write the program in either Processing or Java or C
or C++. For C and C++ use OpenGL and GLUTgraphics routines for the display.
Upload your program and all essential files to webassign as a "as small as possible" zip directory.
In your program, include comments about the program and your name.
Also make sure to provide information that and instructions on how to run it.
|