The Ray Tracer Challenge - 022 - Planes

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ค. 2024
  • Until now our only body type is a sphere. This episode we will introduce the next one: A Plane. Finally a real floor for our renderings.
    Join me, while I implement chapter by chapter from the book "The Ray Tracer Challenge" by Jamis Buck in Rust a language completely new to me.
    Come with me on the journey of learning the Rust programming language, while implementing a Ray Tracer in a Test driven fashion, to have fun and (hopefully) create some astonishing rendered graphics.
    Let's study the inner workings of a Ray Tracer, and take a look under the hood of the Rust language, while taking on this challenge on a weekly basis.
    All the code produced within this series is provided on github, for you to
    follow along.
    Github: github.com/jakobwesthoff/the_...
    The Ray Tracer Challenge (affiliate): amzn.to/3xVssbR
    Rust: www.rust-lang.org/
    Contents
    00:00 - Intro
    00:17 - Recap
    01:47 - Goal of this session
    03:17 - Refactoring our Intersectable trait
    18:41 - Implementing the Plane Intersectable
    22:19 - Normal vector of a plane
    24:44 - Intersection with a plane
    30:49 - Adding enum dispatch for Plane struct
    33:18 - Putting it all together
    35:51 - Rendering a Plane
    #raytracer #rustlang #plane
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 4

  • @flaviocampos3581
    @flaviocampos3581 2 ปีที่แล้ว

    Hi Jakob, Great video!
    I was able to intersect sphere and plane. But I am having hard time to visualize (understand) the logic for a cylinder. Any tips? And thanks again for the videos.

    • @MrJakob
      @MrJakob  2 ปีที่แล้ว +1

      I haven’t yet started implementing cylinder intersection yet. Therefore I did not think about this properly yet. Once I am at that point, I hope to come up with an understandable explanation ;). Should I fail at that, please feel free to ask the corresponding question again, at that point :).

  • @FPChris
    @FPChris 2 ปีที่แล้ว

    Page 130 I get a massive shadow on the wall from the light. I tried to post a link but YT removed it I think

    • @MrJakob
      @MrJakob  2 ปีที่แล้ว

      Yes, TH-cam will remove posted links, as it assumes it is spam.