Overview
This website contains the weekly exercises and final project for the course 02561 Computer Graphics.
Student name: Diana Tofan
Student number: s172393
Exercises
Worksheet 1: Getting started with WebGL - Source code
-
Part 1 - Setup a basic WebGL application.
-
Part 2 - Shaders and buffers.
-
Part 3 - Triangles.
-
Part 4 - A rotating square.
-
Part 5 - A fan of triangles.
Worksheet 2: Input devices and interaction - Source code
-
Part 1 - Draw points.
-
Part 2 - Clear canvas and add color picker.
-
Part 3 - Add 2 different drawing modes: normal (for drawing points) and interactive (for drawing triangles).
-
Part 4 - Draw circles.
Worksheet 3: Projections (virtual camera) and transformations - Source code
-
Part 1 - Draw a wireframe unit cube in isometric view.
-
Part 2 - Draw the unit cube in different classical perspective views.
Worksheet 4: Local illumination – Gouraud and Phong shading - Source code
-
Part 1 - Draw a sphere in perspective view.
-
Part 2 - Use depth buffer and back face culling to remove hidden surfaces.
-
Part 3 - Use Gouraud shading (with true normals) to draw a diffuse sphere lit by a distant, white, directional light with direction (0, 0, −1).
-
Part 4 - Implement the full Phong reflection model in the vertex shader and create sliders for material parameters and light emission.
-
Part 5 - Use Phong shading by moving your implementation of the Phong reflection model to the fragment shader and varying positions and normals across triangles instead of colors.
-
Part 6 - Answers to the questions.
Worksheet 5: Rendering a triangle mesh - Source code
-
Part 1 - Place your WebGL applications on your DTU Student Homepage.
-
Part 2, 3 - Load and display the teapot 3D model with the associated MTL file (if used) to the server.
-
Part 4 - Use Gouraud shading (with true normals) to draw a diffuse sphere lit by a distant, white, directional light with direction (0, 0, −1).
Worksheet 6: Texture mapping - Source code
-
Part 1 - Map a procedurally generated checkerboard texture to a rectangle.
-
Part 2 - Create buttons and/or selection menus that enable you to switch between different texture wrapping modes (repeat or clamp-to-edge) and different texture filtering modes (nearest, linear, mipmap).
Project
Here you can find the report, source code and executable application for the final project.