Reference no: EM132406781
300029 Engineering Visualization Assignment
WSU School of Computing, Engineering and Mathematics - Western Sydney University, Australia
Laboratory Practical - Drawing Graphics Using Opengl and Visual Studio
Aim - OpenGL provides powerful tools for drawing graphics. This laboratory practical aims to introduce some of these tools and use them to draw 2D and 3D objects under the Visual Studio development environment. Skills developed in this practical will be used for two subsequent laboratory practicals and the final project.
Tasks -
1. Modify the drawing function of Display_1 (Display_1::Draw(...)) to draw the two left-most 2D objects (a line segment and a rectangle) using dashed lines.
Listed below are the requirements for this task, which should be addressed in your report.
i. Summarise the C++ source code that you have written for the task using a sequence of steps, a flow chart or pseudo-code.
ii. Explain each step of your C++ source code clearly so that an experienced reader can repeat the task to obtain the same result without the need of your C++ code.
iii. Include the drawing result of the task in your report. You can copy an active screen showing your result by pressing 'Alt-PrintScreen' and then paste it to a WORD document by pressing 'Ctrl-v'.
iv. Explain the drawing result you have obtained (e.g., what has been drawn? Have you drawn what you are asked to draw?).
2. Modify the drawing function of Display_2 (Display_2::Draw(...)) to draw a blue ellipse, x(θ) = 100 + 80 cos(θ), y(θ) = 70 + 30sin(θ), using the OpenGL point function, glVertex*().
Listed below are the requirements for this task, which should be addressed in your report.
i. Summarise the C++ source code that you have written for the task using a sequence of steps, a flow chart or pseudo-code.
ii. Explain each step of your C++ source code clearly so that an experienced reader can repeat the task to obtain the same result without the need of your C++ code.
iii. Include the drawing result of the task in your report.
iv. Explain the drawing result you have obtained (e.g., what has been drawn? Have you drawn what you are asked to draw?).
3. Modify the drawing function of Display_3 (Display_3::Draw(...)) to draw three of the sample objects, namely the two rectangles and the polygon (not the ellipse), using dashed lines so that the interior of each object (rectangle or polygon) is filled with a red colour and the boundary is drawn with a green colour.
Listed below are the requirements for this task, which should be addressed in your report.
i. Summarise the C++ source code that you have written for the task using a sequence of steps, a flow chart or pseudo-code.
ii. Explain each step of your C++ source code clearly so that an experienced reader can repeat the task to obtain the same result without the need of your C++ code.
iii. Include the drawing result of the task in your report.
iv. Explain the drawing result you have obtained (e.g., what has been drawn? Have you drawn what you are asked to draw?).
4. Firstly, modify the drawing function of Display_4 (Display_4::Draw(...)) so that the left image is displayed without any change while the right image is resized to 100 (height) x 150 (width) pixels. Secondly, find an image of your choice (e.g., from your personal collection) and then display the image and a resized version of it. Your images should be placed above the other two images mentioned before. Four images should show when the key '4' on the keyboard is pressed.
Listed below are the requirements for this task, which should be addressed in your report.
i. Summarise the C++ source code that you have written for the task using a sequence of steps, a flow chart or pseudo-code.
ii. Explain each step of your C++ source code clearly so that an experienced reader can repeat the task to obtain the same result without the need of your C++ code.
iii. Include the drawing result of the task in your report.
iv. Explain the drawing result you have obtained (e.g., what has been drawn? Have you drawn what you are asked to draw?).
5. Draw the following 2D objects using ellipses and polygons. Write your code in the drawing function of Display_5 (Display_5::Draw(...)). The 2D objects should show when the key '5' on the keyboard is pressed.
Listed below are the requirements for this task, which should be addressed in your report.
i. Summarise the C++ source code that you have written for the task using a sequence of steps, a flow chart or pseudo-code.
ii. Explain each step of your C++ source code clearly so that an experienced reader can repeat the task to obtain the same result without the need of your C++ code.
iii. Include the drawing result of the task in your report.
iv. Explain the drawing result you have obtained (e.g., what has been drawn? Have you drawn what you are asked to draw?).
6. Draw the following 3D objects using ellipses, polygons and lines. Write your code in the drawing function of Display_6 (Display_6::Draw(...)). The 3D objects should show when the key '6' on the keyboard is pressed.
Listed below are the requirements for this task, which should be addressed in your report.
i. Summarise the C++ source code that you have written for the task using a sequence of steps, a flow chart or pseudo-code.
ii. Explain each step of your C++ source code clearly so that an experienced reader can repeat the task to obtain the same result without the need of your C++ code.
iii. Include the drawing result of the task in your report.
iv. Explain the drawing result you have obtained (e.g., what has been drawn? Have you drawn what you are asked to draw?).
7. Draw a 2D object of your choice. Your 2D object should consist of at least 3 ellipses or circles, and 3 polygons. Write your code in the drawing function of Display_7 (Display_7::Draw(...)). The 2D object should show when the key '7' on the keyboard is pressed.
Listed below are the requirements for this task, which should be addressed in your report.
i. Summarise the C++ source code that you have written for the task using a sequence of steps, a flow chart or pseudo-code.
ii. Explain each step of your C++ source code clearly so that an experienced reader can repeat the task to obtain the same result without the need of your C++ code.
iii. Include the drawing result of the task in your report.
iv. Explain the drawing result you have obtained (e.g., what has been drawn? Have you drawn what you are asked to draw?).
v. Describe/explain the challenges of this task when compared to Tasks 1-6 above.
8. Draw a 3D object of your choice. Your 3D object should consist of at least 4 ellipses or circles, and 4 polygons. Write your code in the drawing function of Display_8 (Display_8::Draw(...)). The 3D object should show when the key '8' on the keyboard is pressed.
Listed below are the requirements for this task, which should be addressed in your report.
i. Summarise the C++ source code that you have written for the task using a sequence of steps, a flow chart or pseudo-code.
ii. Explain each step of your C++ source code clearly so that an experienced reader can repeat the task to obtain the same result without the need of your C++ code.
iii. Include the drawing result of the task in your report.
iv. Explain the drawing result you have obtained (e.g., what has been drawn? Have you drawn what you are asked to draw?).
v. Describe/explain the challenges of this task when compared to Tasks 1-6 above.
9. Perform a task of your choice, which can be used to distinguish you from others. This is a required task and it must be directly related to this unit of study. Use Display_9 of the sample program to show the result of this task. Examples of the task are given below.
Example 1: You find a problem during this lab practical. You decide to tackle the problem. You propose a method to solve the problem and implement the method using C++. You show results to verify your proposal.
Example 2: You find an interesting algorithm in the textbook, which has not been (and will not be) discussed in this unit of study. You decide to implement the algorithm in C++. You show results to verify your implementation.
Example 3: You find an interesting algorithm in visualisation in an IEEE journal. You decide to implement the algorithm in C++. You show results to verify your implementation.
The requirements for this task are listed below.
i. Please respond to the following questions in your report.
What is the aim of the task? In other words, what do you want to do?
Why do you want to do it?
What are the challenges of this task when compared to the tasks above?
How do you do it? In other words, can you explain your method or implementation?
What are your results? Can you explain them?
What can you conclude from the results?
Have you achieved your aim?
Is your conclusion significant and why?
Lab report - You need to write a report for this lab practical. You may exchange ideas and techniques with others. However, you must write your report independently. The requirements for your lab report are listed below.
i. Attach an assignment cover sheet that you have completed for this lab practical.
ii. State the aim of the lab practical.
iii. Include your response to the requirements for each task. Your report should be divided into sections such that each task is discussed individually in one section.
iv. Include the conclusion of this lab practical.
Attachment:- Engineering Visualization Assignment File.rar