Computer Graphics | 代做html | 代写webgl | opengl代写 – CS 432 Interactive Computer Graphics

CS 432 Interactive Computer Graphics

Computer Graphics | 代做html | 代写webgl | opengl代写 – 本题是一个利用CG进行练习的代做, 对CG编程的流程进行训练解析, 涉及了webgl opengl等代写方面, 这个项目是assignment代写的代写题目

html代写 代写html 网站代写 网页代写

assignment 7 Lighting

Objective:

  1. Add material properties to your objects and compute colors using lighting effects.

The Scene

In this assignment you will build a small world consisting of three objects each with different material properties. You will also have two different light sources to illuminate the scene.

The background should be light gray (0.9, 0.9, 0.9, 1.0) on a square canvas with the viewport populating the entire canvas.

There will be three objects in the scene:

  1. A ground plane.
  2. A sphere sitting atop the ground plane.
  3. A cube, also sitting atop the ground plane.

Description of the how the objects are to be rendered, the camera interface, and the material- light interactions are described in the next sections.

Ground Plane

You can decide the size of your ground plane and its material properties. However, the location of its vertices must be computed using recursive subdivision so that we can have good lighting effects. Since we are doing light effects, all our objects should also have per- vertex normal attributes placed on the GPU.

Sphere

Your sphere can be created however you like (parametrically, via recursive subdivision, loaded model, etc..). Your per-vertex normal attributes should be either computed using Gourauds method or based on the parametric equation of a sphere. Material properties of the sphere are up to you.

Cube

Your cube should be based on the code shown in the lecture material. Once again, well now also need per-vertex normal attributes on the GPU and you may choose the material properties of the cube.

Directional Light

You should have one directional light that acts like a sun in that it rises in the east (right) and sets in the west (left). To do this you will change the direction of the light via animation.

Flashlight

The second light is a flashlight implemented as a spotlight always positioned at the center of the camera, pointed in the direction of the camera.

Your scene should look something like this.

Interaction

Camera Interface
You must have some camera interface so that the user can explore the world. The nature of
the interface is up to you, but there should be instructions in the  html document so that a
user knows how to use it.
Your camera should use perspective projection, although the parameters of it are up to you.
Additional Interactions
  • key (spacebar): This toggles between the flashlight being on and off.

What to submit?

Submit a single zip file containing all the files needed to run your code.

We should be able to extract your file, navigate to your directory, run an http server there and run your code in a browser.

Grading:

  1. Objects placed logically/correctly in the world: 2pts
  2. Camera interface documented and behaves properly: 2pts
  3. Directional light behaves properly: 2pts
  4. Flashlight behaves properly: 2pts
  5. Toggling the flashlight on and off works: 2pts