Giter VIP home page Giter VIP logo

raytracer's Introduction

Raytracer

The project includes the implementation of a raytracer with capabilities for rendering scenes, handling intersections with various shapes, computing lighting using Phong reflection, handling shadows, and recursive ray tracing for reflective surfaces.

Project Overview

The provided framework loads scenes from a JSON configuration file and manages the output by generating a PNG image. The path to the configuration file should be passed to the program as an argument. Various test scenes are available in the subdirectory data/task1/. A successful execution generates a file named <config-name>.png in the output/task1/ directory.

Usage

The easiest way to set up the project is to build a Docker image based on the provided Dockerfile and to use it within an interactive session. The raytracer processes scenes from a JSON configuration file. Upon successful execution, it generates a PNG file representing the rendered scene.

$ docker build -t cgtask1 .

To list the JSON files:

$ ls data/task1/*.json | xargs -n1 basename

bunny.json
bunny_spotlight.json
cone_of_destiny.json
cone_shadow.json
cone_shadow_spotlights.json
cube_basic.json
dragon.json
ray_cube_basic.json
ray_cube_oriented.json
ray_cubes.json
ray_cubes_transformed.json
ray_cube_translated.json
ray_plane_basic.json
ray_planes_cone.json
three_cones.json
tumble.json
tumble_shadow.json
x-wing.json
x-wing_spotlight.json

Finally, use following command to generate the output using files above, for example:

$ docker run --rm -it -v "./output:/app-data/data/task1/output/task1" cgtask1 <file name>.json

raytracer's People

Contributors

astrokit avatar

Watchers

 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.