[SOLVED] CS代考计算机代写 gui algorithm Your assignment is to build a triangle rasterizer based on the files you’re given below. The API calls in rend.cpp *must* be provided just as they are outlined. Remember to interpolate Z and do Z-buffer testing on each pixel write to the Display.

30 $

File Name: CS代考计算机代写_gui_algorithm_Your_assignment_is_to_build_a_triangle_rasterizer_based_on_the_files_you’re_given_below._The_API_calls_in_rend.cpp_*must*_be_provided_just_as_they_are_outlined._Remember_to_interpolate_Z_and_do_Z-buffer_testing_on_each_pixel_write_to_the_Display..zip
File Size: 2694.12 KB

SKU: 2517280067 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


Your assignment is to build a triangle rasterizer based on the files you’re given below. The API calls in rend.cpp *must* be provided just as they are outlined. Remember to interpolate Z and do Z-buffer testing on each pixel write to the Display.
*** Changes in the API are not allowed ***
Your application may include additional calls to the renderer that provide extensions to the required API functionality, but the standard application must still work without modification.
Your renderer uses your display code from HW1. If your display code is not yet correct, you’ll have to complete it since you need it now.
There are several other files there that will be useful.
– Gz.h : Global definitions
– Application2.cpp : new application that calls for your rend.cpp functions
– rend.cpp : new skeleton file with API definition and comments
– pot4.screen.asc : the Utah teapot triangle data transformed for scan conversion – pot4.ppm : the result of running “app2 pot4.ppm”
The result images are made into a 256×256 window.
Do not change the resolution/size of your display image since the transformation is precomputed for that size.
NOTE – your background color may be different than mine. That’s not important. It’s not part of the API. Discrete computation precision limits and algorithm variations can lead to slightly different result images. Exact pixel-for-pixel match to the reference result image is not expected. If your result is free of obvious artifacts, it will be considered correct.

Your assignment is to add the transformation process to your HW2 rasterizer. The API calls in rend.cpp *must* be provided just as they are outlined. The Application3 must work without modification, but you should modify the app code to test various rendering conditions.
*** Changes to the API are not allowed *** The files in hw3.zip include:
Gz.h : A few new definitions for hw3
Application3.cpp, Application3.h: New application that calls your rend.cpp functions rend.cpp : New skeleton file with API definition and comments
tri.asc : A one-triangle data file for testing
tri.ppm : Running app3 on tri.asc produces tri.ppm (using the default camera) pot4.asc : The Utah teapot triangle data file, now in its original model coordinates pot4.ppm : The result using the renderer¡¯s default camera
pot4.cam.ppm : The result with the application setting the camera CS580HWView.cpp : Link to your application3 and the user interface code.
Other files for the GUI and Windows framework
/* Camera defaults */ #define DEFAULT_FOV #define DEFAULT_IM_Z #define DEFAULT_IM_Y #define DEFAULT_IM_X
/* default look-at point = 0,0,0 */
35.0 /* use as both H and V field of view */ (-10.0) /* world coords for image plane origin */ (5.0)
(-10.0)
The result images are created in a 256×256 window, but you can modify the app3 code to change the size of your FB. The image should magnify or shrink to fit the FB. Again – your background color may be different than mine.
You should “stress-test” your renderer by changing the camera and look at point with the PutCamera call. Don’t forget to clip triangles that are behind the view plane. Try to get an intuition for what happens with different camera parameters.
From now, you can move your object using given user interface. If you click edit button, you can choose three transformation options; Rotate, Translate, and Scale.
If you choose ¡°Rotate Object¡±, rotation dialog pops up and you can type the value.
If you choose ¡°Translate Object¡±, translation dialog pops up and you can type the value.
If you choose ¡°Scale Object¡±, scale dialog pops up and you can type the value.

If you push ¡°Render >> RunRender¡± button, the transformed object is rendered.
We provide the code for the user interface but you need to provide the function body code that builds the incremental matrices in rend.cpp. Your code should build a transformation based on the parameter that¡¯s specified. Then you set the matrix mat to your result. The interface code takes that matrix and pushes on the matrix stack. Note this incremental matrix is pushed after the application pushes its normal model matrix, so the incremental matrix is right-most in the chair and the last matrix pushed on the stack.
int GzRender::GzRotXMat(float degree, GzMatrix mat)
int GzRender::GzRotYMat(float degree, GzMatrix mat)
int GzRender::GzRotZMat(float degree, GzMatrix mat)
int GzRender::GzTrxMat(GzCoord translate, GzMatrix mat)
int GzRender::GzScaleMat(GzCoord scale, GzMatrix mat)
The callback function, which pops-up a dialog and accumulates transformations for the renderer is in the CS580HWView.cpp. See the followings functions in CS580HWView.cpp for details and to understand the interface.
void CCS580HWView::OnRotate() void CCS580HWView::OnTranslate() void CCS580HWView::OnScale()
*** Please do not change the user interface code ***
Submit process is similar to your previous homework. Please read homework guide line carefully. (DO NOT include Debug directory.)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS代考计算机代写 gui algorithm Your assignment is to build a triangle rasterizer based on the files you’re given below. The API calls in rend.cpp *must* be provided just as they are outlined. Remember to interpolate Z and do Z-buffer testing on each pixel write to the Display.
30 $