kerem
Uploaded by
5 SLIDES
199 VUES
50LIKES

Understanding Ray-Sphere Intersection and Quaternions in 4D Vector Space

DESCRIPTION

This document explores the method of intersecting a ray with a bounding sphere using the float intersectRaySphere function. It explains the mathematical computation behind ray-sphere intersection, utilizing geometric properties like dot products and square roots. The second part delves into quaternions, their significance in 4-dimensional vector space, and their advantages over traditional rotation methods, such as avoiding gimbal lock. Quaternions require only four components to represent 3D rotations, making them efficient and practical for computations in computer graphics and robotics.

1 / 5

Télécharger la présentation

Understanding Ray-Sphere Intersection and Quaternions in 4D Vector Space

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript

Playing audio...

  1. Intersecting a Bounding Sphere • float intersectRaySphere(Ray ray,Sphere sphere) { Vecdst = ray.o - sphere.o; Real B = dot(dst,ray.d); Real C = dot(dst,dst) - sphere.r2; Real D = B*B - C; return D > 0 ? - B - sqrt(D) : std::numeric_limits<float>::infinity(); }

  2. Quaternions

  3. What are Quaternions? • An element of the 4-Dimensional vector-space

  4. Why do you need quaternions? • No Gimbal Lock • They only require 4 numbers, to represent the equiv. of a 3x3 Matrix (9 Numbers) • Angle / Axis conversions are simple • Normalising Quaternions vs. Orthogonalising Matrices • Multiplicative like matrices

  5. What a Quaternion looks like • w + xi + yj + zk (i, j, and k are imaginary numbers)

More Related