Code Monkey home page Code Monkey logo

rusty-raytracer's Introduction

rusty-raytracer

Raytracer for learning Computer Graphics

Run using the command cargo run. Current and planned branches:

  • master: Skeleton/framework for the program.
  • simple-trace: Implement a basic algorithm that shoots ray from the camera.
  • monte-carlo (TBD): Implement some Global Illumination style algorithms?

Todo list:

See the projects tag in github.

Source code structure

  • root src folder:
    • main.rs: Program entry point, hook into the cores, manage the progress bar, etc.
    • core.rs: Core rendering algorithms: trace(), top level code for dealing with materials (called "lighting model"), anti-aliasing.
    • sample.rs: Codes for constructing/setting up scene for test.
    • util.rs: Other stuffs, like color.
  • model folder:
    • Main (mod.rs per Rust lang): Objects for 3D stuff in the scene - Scene Graph Model (is a tree), Material, and Ray.
    • intersect.rs: Intersectable trait to take care of the details of doing ray-object intersection (mechanism vs policy).
  • scene folder:
    • Main: Main object for the whole scene, which contains the model/scene graph plus a bunch of "meta" stuffs.
    • light.rs: Different kinds of Lighting.
    • camera.rs: Camera class, manage the projection and view matrices and help to shoot a ray.

rusty-raytracer's People

Contributors

lemonteaa avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

razum2um

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.