A Ray as an Origin, Direction, and Parameter

Write a ray using its origin and direction, and interpret its parameter in scene coordinates.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a position
  2. Choose a parameter interpretation

The point at parameter \(t\ge0\) is \(p(t)=o+td\), where \(o\) is the origin and \(d\) is a nonzero direction.

Trace a position

With origin \((1,2)\), direction \((2,0)\), and t=3, the point is \((7,2)\). The travel distance is six because the direction has length two. See displacement vectors.

Choose a parameter interpretation

When direction has unit length, the parameter gives distance in scene units. If an algorithm assumes that interpretation, normalize its direction. Vector normalization describes the step.[1]

References

  1. Matt Pharr, Wenzel Jakob and Greg Humphreys, Physically Based Rendering ↩