How Do You Calculate Ray and Ellipsoid Intersections?

  • Context: Graduate 
  • Thread starter Thread starter bobthebanana
  • Start date Start date
  • Tags Tags
    Ellipsoid Ray
Click For Summary
SUMMARY

This discussion focuses on calculating ray and ellipsoid intersections using vector mathematics. The ray is represented by the equation p(t) = e + td, where e is the starting position and d is the direction. For spheres, the intersection is determined using the equation (p-c)·(p-c) - R² = 0, which can be manipulated to solve for t. To extend this to ellipsoids, the ellipsoid's equation (x/a)² + (y/b)² + (z/c)² = 1 is utilized, requiring a transformation of coordinates to center the ellipsoid at the origin.

PREREQUISITES
  • Understanding of vector mathematics and ray equations
  • Familiarity with the geometric properties of spheres and ellipsoids
  • Knowledge of algebraic manipulation techniques
  • Experience with coordinate transformations in 3D space
NEXT STEPS
  • Study the derivation of ray-sphere intersection equations
  • Learn about coordinate transformations for ellipsoids
  • Explore advanced topics in computational geometry
  • Investigate applications of ray tracing in computer graphics
USEFUL FOR

Mathematicians, computer graphics developers, and anyone involved in 3D modeling or physics simulations will benefit from this discussion.

bobthebanana
Messages
21
Reaction score
0
So I have an array p(t) = e + td, where e is the start position, t is some parameter, and d is the direction of the ray

For a sphere with center c and radius R, the vector form equation is (p-c).(p-c)-R^2=0

This can be algebraically manipulated into:

t = (-d.(e-c) +- sqrt((d.(e-c))^2 - (d.d)((e-c).(e-c)-R^2))) / (d.d)



How can I express t for ellipsoids? I know there's an xRadius, yRadius, and a zRadius instead of radius R
 
Physics news on Phys.org
The most direct way is to transform the coordinates so that the ellipsoid is centered at the origin and its three axes coincide with the coordinate axes. The equation for the ellipsoid is then (x/a)2+(y/b)2+(z/c)2=1. Then substitute the components of p(t) for x,y,and z to get the equation for t.
 
Wouldn't that make a great name for a band "Ray Ellipsoid and the intersections"?
 

Similar threads

  • · Replies 23 ·
Replies
23
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
888
  • · Replies 11 ·
Replies
11
Views
2K
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
6K