Giter VIP home page Giter VIP logo

libingzeng / anintroductiontoraytracing Goto Github PK

View Code? Open in Web Editor NEW
18.0 0.0 2.0 5.85 MB

This renderer is based on the framework of Peter Shirley's ray tracing in one weekend and is extended with tracing almost all of the surfaces mentioned in the book, An Introduction to Ray Tracing. The extended surfaces are all NON-TRIANGULATE, which include box, sphere, polygon, quadric surfaces, tori, blending and joining surface, superellipsoid, superhyperboloid, supertoroid, blobs, tear drop, bicubic Bezier patches, bicubic B-spline patches, translational sweeping surface, cone sweeping surface, rotational sweeping surface, sphere sweeping surface, and CSG surfaces.

C++ 99.81% C 0.19%

anintroductiontoraytracing's Introduction

AnIntroductionToRayTracing

This render is based on the framework of Peter Shirley's ray tracing in one weekend and is extended with tracing almost all of the surfaces mentioned in the book, An Introduction to Ray Tracing. The extended surfaces are all NON-TRIANGULATE, which include box, sphere, polygon, quadric surfaces, tori, blending and joining surface, superellipsoid, superhyperboloid, supertoroid, blobs, tear drop, bicubic Bezier patches, bicubic B-spline patches, translational sweeping surface, cone sweeping surface, rotational sweeping surface, sphere sweeping surface, and CSG surfaces.
Some of the main resultant images were uploaded in the path: results/pictures.
An overview of the surfaces:

There is a Macro named testNumber in main.cpp.
We can set testNumber to run the corresponding test case and produce image.

#define testNumber 16
/*
1: output the first image
2: test "int &ri£¨int& ri£¨int *&pri"
3: output the first image by using vector.
4: test the class "vec3"
5: test the function "inline vec3& vec3::operator+=(const vec3 &v)"
6: test rays
7: test rays and add a sphere
8: visualize the normals of sphere.
9: several spheres
10: abstract class
11: antialiasing
12: diffuse materials
13: metal
14: dielectric
15: positionable camera and defocus blur
16: random scene
17: ray/box intersection
18: triangle
19: polygon
20: box
21: linear equation
22: get_vector_v
23: box2()
24: any box
25: ellipsoid
26: inverse mapping
27: find the roots of quartic equation
28: tori
29: cylinder all
30: get_vector_vw()
31: tori_part_all
32: acos(z_n, u_xoz)
33: quartic_blend_cylinder
34: superellipsoid
35: rain
36: parametric surface
37: matrix
38: read file
39: translational sweeping
40: roots number of equation of 6th degree or 10th degree
41: rotational sweeping
42: sphere sweeping
43: binary tree
44: binary tree 2
45: intervals
46: CSG
*/

If you can read simple Chinese, you could find more details in my blog: https://blog.csdn.net/libing_zeng/article/details/72603619
If you have any question to share with me, you can reach me by email: [email protected]

anintroductiontoraytracing's People

Contributors

libingzeng avatar

Stargazers

 avatar yihong wu avatar Fedor Ivachev avatar  avatar  avatar  avatar Vincent Pancaldi avatar Chad Layton avatar rodrigo figueroa avatar Sultan Uramaev avatar Álvaro García León avatar Sergey Makeev avatar Galli Davide Francesco Maria avatar Rui avatar hazukiaoi avatar Sayo avatar iteapoy 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.