GithubHelp home page GithubHelp logo

dupeiran001 / rust-ray-tracing-in-one-weekend Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 8.85 MB

a rust version of 'Ray-tracing in One Weekend', a guide book to computer graphics

Rust 21.77% Markdown 78.23%

rust-ray-tracing-in-one-weekend's Introduction

Cargo Build Badge GitHub Page Deploy Badge

Introduce

Ray-tracing in one weekend is a great introduction to the computer graphics. It's originally based on c++, but I'm a big fan of rust. So I'd like to use rust to implement the code in that book. We should be able to finish it in one weekend, having a tracer and producing some great images.

Rust is a bit different with c++, as it has a more strict static compiler. We'll need more effort to fight with compiler! My rust code maybe is not the most elegant solution, so any contribution is highly welcomed! You are required to have some basic knowledge of Rust, which can be learned from The Book

Usage

This is a cargo project, and the ./book directory is a mdbook project. The online preview of this book can be found here: (Rust) ray-tracing in one weekend, or you can clone this repository and build your own static copy:

git clone https://github.com/dupeiran001/rust-ray-tracing-in-one-weekend
cd book
mdbook serve --open

And the source code can be run using:

cargo run

which will generate the output to the stdout, and can be redirecting to a file using:

cargo build
./target/debug/ray_tracing > image.ppm

on linux or

cargo build
./target/debug/ray_tracing.exe > image.ppm

which will generate an output picture called image.ppm. of course, any marked commit can be used to generate the output of the corresponding chapter.

Contribution

Any Contribution is Highly Welcomed!! No matter it's just a space alignment error or a code playground mark error, every contribution will be carefully treated!

rust-ray-tracing-in-one-weekend's People

Contributors

dupeiran001 avatar

Stargazers

 avatar  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.