This week’s discussion has provided an introduction to viewing, particularly wit

by | Jan 14, 2022 | Computer Science | 0 comments

This week’s discussion has provided an introduction to viewing, particularly with respect to various projections and related functions. In this assignment, you will briefly discuss several viewing functions and then use the code snippet in section 5.4.6 to design an interactive Viewer using WebGL.
In your program:
Include screenshots your working program
Submit all the source files of your working program
Your paper should meet the following requirements:
Be two pages in length (screenshots), not including an APA title page and APA reference page.
Include at least one reference from the readings or an outside sources. The CSU Global Library is a good place to find your sources.
Follow the CSU Global Writing Center (Links to an external site.).
function render()
eye = vec3(radius * Math.sin(theta) * Math.cos(phi),
radius * Math.sin(theta) * Math.sin(phi),
radius * Math.cos(theta));
modelViewMatrix = lookAt(eye, at, up);
projectionMatrix = ortho(left, right, bottom, ytop, near, far);
gl.uniformMatrix4fv(modelViewMatrixLoc, false, flatten(modelViewMatrix));
gl.uniformMatrix4fv(projectionMatrixLoc, false, flatten(projectionMatrix));
gl.drawArrays(gl.TRIANGLES, 0, numVertices);
//The fixed values:
const at = vec3(0.0, 0.0, 0.0);
const up = vec3(0.0, 1.0, 0.0)
//The vertex shader:
attribute vec4 vPosition;
attribute vec4 vColor;
varying vec4 fcolor;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
void main() {
fcolor = vColor; gl_Position = projectionMatrix * modelViewMatrix * vPosition;
//The fragment shader:
varying vec4 color;
void main()
gl_FragColor = fcolor;
// To control near and far distances:
depth .05
min=”.05″ max=”3″ step=”0.1″ value =”2″ />
// The corresponding eventhandler:
document.getElementById(“depthSlider”).onchange = function() {
far = event.srcElement.value/2;
near = -event.srcElement.value/2;


Timely Delivery

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Affordable Prices

Top Quality Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university, or professional, and we will assign a writer who has a respective degree.

24/7 Support

Our support agents are available 24/7 and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

100% Plagiarism Free

Plagiarism is the biggest crime in the academic world. We have strict measures to ensure that all the essay papers are written from scratch to maintain originality and avoid plagiarism.

Professional Writers

We have hired a team of professional writers who provide expert essay help. Most of them are native speakers and PhD holders who are able to take care of any assignment you need help with.

We Protect Your Privacy

Anonymous Communication

We offer nameless communication between clients and writers. We value privacy on both sides.

Secure Payments

We do not collect or store any payment information. The order form is protected using SSL 256-bit encryption.

Personal Data Protection

Your personal information remains private and secure under our comprehensive privacy policy. We strictly follow the rules.

Why Us?

Exceptional quality, professional writers, secure and private, always on time. This is how our clients described their experience working with us. We value our clients above all and strive to uphold the high standards that we have set.

Quality is everything. We make sure that each completed paper that we send is an absolute masterpiece. It is well-written, thoroughly thought out, follows guidelines, has impeccable format and completely original. You can be confident that your paper is one-of-a-kind because we double-check it for plagiarism. Your instructor will be impressed when you turn in your paper.


Our Team has special quality assurance team guarantees that all the papers are plagiarism-free and meet the standards or specific requirements of certain academic institutions (these may vary, you know, and they may vary even between different teachers). Upon placing an order, you can communicate with your writer during the entire process and even after it is completed. This ensures a customized service, meeting the exact needs and expectations of any, even the most demanding customers.

Contact Us

Get Started