Giter Club home page Giter Club logo

raytracing's Introduction

In this homework you will write a simple ray tracer to render a scene composed of two spheres and a tetrahedron. The two spheres are of different radii and colors (e.g., blue and green). Pick the centers and the radii of the spheres so that they do not intersect in the 3-D space. For simplicity, you may assume a directional light and a parallel camera geometry for rendering purposes. This means that a single LookAt vector can be used to generate all rays. For example, you may set the LightDir = (0, 1, 0) and LookAt = (0, 0, −1).

• Write a simple OpenGL program to display an image. Fix the window size (e.g., 256 × 256). You may use the glDrawPixels function to draw the contents of an array of RGB values. Verify the correctness of your program by displaying a test image that you generate (e.g., color stripes).

• Generate parallel rays and solve the ray-object intersection problems to determine the color of each pixel. Verify the correctness of your ray tracer by rendering the scene from multiple angles (e.g., change the LookAt vector).

• Add ambient, diffuse and specular shading to your ray tracer. Pick the ambient, diffuse and specular constants and light intensities to reflect a realistic rendering of the scene.

• Add a glazed surface to the scene. You may choose to set one of the objects in the scene or have a plane below these objects that appears as a glazed surface.

• Create a small animation by changing the LookAt vector and assembling the rendered images into a movie. 10pts

• Along with the source code and makefile, submit a report (a PDF file) that describes and documents your experiments for each step of the homework.

raytracing's People

Contributors

qzeng2490 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.