Coder Social home page Coder Social logo

mario-hero / ray-tracing-in-one-weekend-with-rust Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 98 KB

本项目为一个简单的光线追踪渲染器,参考《Ray Tracing in One Weekend》的C++代码,用Rust实现。仅一个main.rs文件。实现了基本的漫反射、金属、玻璃材质。 This project is a simple ray tracing renderer, referring to the C++ code of Ray Tracing in One Weekend, Implement using Rust. Only one main.rs file. Lambert, metal and glass materials have been implemented.

License: MIT License

Rust 100.00%

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

Ray Tracing in One Weekend with Rust

本项目为一个简单的光线追踪渲染器,参考《Ray Tracing in One Weekend》的C++代码,用Rust实现。仅一个main.rs文件。实现了基本的漫反射、金属、玻璃材质,导出的渲染图如下。另外,可访问下一章节:Mario-Hero/Ray-Tracing-The-Next-Week-With-Rust

This project is a simple ray tracing renderer, referring to the C++code of Ray Tracing in One Weekend, implement using Rust. Only one main.rs file. Lambert, metal and glass materials have been implemented, and the exported rendering image is as follows. Also, you are welcomed to visit the next chapter: Mario-Hero/Ray-Tracing-The-Next-Week-With-Rust.

依赖 Dependency

  1. Rayon: 用于多线程加速渲染 Used for multi-threaded accelerated rendering.
  2. nalgebra: 提供Vec3支持 Provide Vec3 support.
  3. tokio、indicatif: 实现进度条 Used to implement a progress bar.

用法 Usage

cargo run --release 运行并等待完成。 Run and wait for completion.

然后打开目录下的pic.ppm图片文件即可。Then open the pic.ppm image file in the directory.

License

The project is released under MIT License.

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

Contributors

mario-hero 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.