Description
In this assignment, you will create commented code for a 3D pyramid in modern OpenGL.
If you encounter any challenges while completing this assignment, be sure to post your questions or issues to the General Questions discussion. It is essential to ask for help when you need it and successfully complete each activity, as the course will continue to build on earlier learning as your skills progress.
Prompt
Before you begin, be sure to review the module resources for this week’s topics. Then, if you have not done so already, navigate to the CS 330 folderin GitHub. From there, download the ZIP file containing all of the items within this folder, including assignment tutorials for Module Two through Module Six. There are two essential parts to these tutorials: the markdown (MD) files that walk you through how to work with different OpenGL capabilities, and the solution (SLN) file that contains all the code for each section of the tutorials. On your own machine, open the solution (SLN) file in Visual Studio and navigate to the Module Three tutorial sections in the Solution Explorer. While you may open the markdown (MD) file using an external text-based program, we recommend you instead follow along with the Module Three Tutorial in GitHub so it is easier to review the different sections, code, and supporting images. Going through all the sections in the tutorial and attempting the embedded exercises will help you practice the skills you will need to demonstrate in this assignment.
Once you understand the content in the tutorial, you will begin this assignment by opening a new Visual Studio project that has all the libraries set up correctly (which you learned how to do in a previous module). The goal of this assignment is to write commented modern OpenGL code to create a 3D pyramid.
Your pyramid should use the indices and the Vertex Array Object, with each vertex on the pyramid being assigned a color of your choice. Employ the Model View Projection matrix to display the pyramid in a perspective angle.
Specifically, you must address the following rubric criteria:
Create code to address the required functionality. The work you complete in OpenGL must meet the required functionality and visual representation that are outlined for this particular topic. Achieving this result may require multiple attempts or the application of programming strategies, but that is okay! Working in iterations is an important part of any coding project. You may also wish to refer back to relevant sections of this week’s tutorial for further guidance or review.
Apply logic and proper syntax to code. Source code should be free of logical or syntax errors that prevent the application from running as expected. You will be given credit for code that is well on its way to meeting specifications or solving the problem.
Apply commenting and formatting standards to facilitate understanding of the code. All code should be well commented. This is a practiced art that requires clarity and concision. Your comments should explain the purpose of lines or sections of the code and may also include the method you used to achieve a specific task in the code. Be sure to document any sections of code that are producing errors or incorrect results. Also, all code should be organized to meet formatting standards.
Guidelines for Submission
Submit a completed ZIP folder with all of your code, which may include one or multiple CPP files along with Visual Studio project files. Also make sure the ZIP folder includes an EXE file, because without this your code will not be able to run. Checking for the EXE can be used as a quick reference on the functionality of your code before you submit. Reference the Visual Studio Export Tutorial, linked in this week’s resources, for guidance on how to download the necessary ZIP folder.
part 2
Overview
You work as a C++ and OpenGL 3D graphics developer for Triangle & Cube Studios. This company designs 3D worlds for clients and customizes them based on the varied needs presented by each particular client.
- In this professional landscape, the demand for computational graphics and visualizations is continually growing. Your clients may come from the games industry looking for graphics and animations, the healthcare industry for medical visualizations, the entertainment industry for computer-generated imagery (CGI) and visual effects, business industries for 3D printing to create physical objects for applied real-world problem solving, and much more. When you are assigned one of these types of projects, you become responsible for writing code in OpenGL to create objects, apply texture, apply light, render, and control virtual environments relative to a virtual camera.
- Your current project with Triangle & Cube Studios is to recreate a 3D version of a 2D image that you have been given by a client. Your client will later be 3D printing this to use as a preliminary concept for their business, so they only need you to create a simple approximation using a few basic shapes.
- This week you will begin recreating the 2D scene by constructing just one 3D object. Note that you will be using the image you selected last week for this task.
Prompt
Using the image you selected in the Module Two milestone (see attachment), begin creating a 3D object to represent one of the objects in your 2D scene. The object you create in this milestone will need to be made from two or more primitive 3D shapes. You will complete your work in Visual Studio. Be sure to work from a project file that has the libraries set up correctly from your work in Module One.
Specifically, you must address the following rubric criteria:
Create a complex 3D object using at least two primitive shapes. The object you create should be reflective of one object from your 2D scene. At this stage of your object’s creation, you should add different colors to each vertex of the object. This will help you better visualize the variance between the different parts of the shapes you are creating. Note that the code you already have uses rainbow colors on the shapes that are provided; if you use this code you may keep that rainbow format. Remember, the shapes you may wish to use are as follows:
Cube
Cylinder
Plane
Pyramid
Sphere
Torus
Apply transformations so shapes are scaled, rotated, and translated (placed) correctly. This work should be relevant for the 2D reference image. For example, if you are working with a cylinder, should it be standing up or lying on its side, based on the image you are referencing? If you are also creating a cube, where should it be placed relative to the cylinder? What sizes are the two objects when compared to each other? It will be easier if you complete these transformations in the right order for your specific object. In general, you will wish to first scale, then rotate, and then translate. While this is not always the case, that is the most likely order for your process to follow.
Create code that follows a logical flow without syntax errors. The code you create needs to be executable and all the code that is included will have to be reached by the execution. Note that not everything should be written in a single function and your work should be well-modularized.
- Apply coding best practices in your creations. Pay particular attention to the way you format and comment your code. Program code should be easy to read and follow industry standard code formatting practices, such as indentation and spacing. Commenting best practices should be in place to ensure the source code is briefly and clearly explained using descriptive comments.
Unformatted Attachment Preview
Purchase answer to see full attachment
Explanation & Answer
Please view explanation and answer below.PART TWO REPORT- The project recreate the 2D scene(picture) by constructing just one 3D object. - Inside the scene you will see one "Complex 3D Object" (we call it so inside this assignment even its a wrong word) built from different meshes (1 mesh = 1 primitive), this Complex3DObject is the MON...