Content deleted Content added
DuncanHill (talk | contribs) Fixing harv/sfn error. Please watchlist Category:Harv and Sfn no-target errors and install User:Trappist the monk/HarvErrors.js to help you spot such errors when reading and editing. |
m →Sources: clean up, replaced: |journal=Journal of Computer Graphics Techniques (JCGT) → |journal=Journal of Computer Graphics Techniques |
||
(6 intermediate revisions by 6 users not shown) | |||
Line 10:
:<math>\boldsymbol p(t) = \boldsymbol o + t \boldsymbol r</math>.
Assuming that all intersections
:<math>t = \frac{\boldsymbol p - \boldsymbol o}{\boldsymbol r}</math>
Line 50:
</math>
While the equations above are well defined for [[real number|real-valued]] variables only if <math>r_i \ne 0 \; \forall i</math>, i.e. if the ray is not parallel to any of the coordinate axes, the algorithm can be applied to an [[Extended real number line|extended real number]] arithmetic (such as the one implemented by [[IEEE 754]]) to handle rays parallel to an axis, as long as the origin of the ray itself does not lie on one of the faces of the bounding box. In such arithmetic, the intersections with the planes parallel to the ray will be given by <math>t = +\infty</math> or <math>t = -\infty</math>, and the algorithm will still work as expected. If the origin lies on a face of the bounding box, then for some <math>i</math> it will happen that <math>t_i = \frac{0}{0}</math>, which is undefined (in IEEE 754 it is represented by [[NaN]]). However, implementations of the [[IEEE 754-2008 revision|IEEE 754-2008]]
== References ==
Line 56:
== Sources ==
* {{cite book|
* {{cite conference|last1=Kay|first1=Timothy L.|last2=Kajiya|first2=James T.|title=Ray tracing complex scenes|conference=ACM SIGGRAPH computer graphics|volume=20|number=4
* {{cite journal|first1=Alexander|last1=Majercik|first2=Cyril|last2=Crassin|first3=Peter|last3=Shirley|first4=Morgan|last4=McGuire|title=A Ray-Box Intersection Algorithm and Efficient Dynamic Voxel Rendering|journal=Journal of Computer Graphics Techniques
* {{cite book|title=Ray Tracing Gems II|chapter=Ray Axis-Aligned Bounding Box Intersection|first1=Peter|last1=Shirley|first2=Ingo|last2=Wald|first3=Adam|last3=Marrs|publisher=Apress|___location=Berkeley, CA|year=2021}}
== External links ==
* {{cite web|last=Barnes|first=
{{DEFAULTSORT:Slab method}}
|