Ray Ellipsoid intersections?

Main Question or Discussion Point

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
 

Answers and Replies

mathman
Science Advisor
7,713
397
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.
 
mgb_phys
Science Advisor
Homework Helper
7,744
11
Wouldn't that make a great name for a band "Ray Ellipsoid and the intersections"?
 

Related Threads for: Ray Ellipsoid intersections?

Replies
2
Views
3K
  • Last Post
Replies
5
Views
19K
  • Last Post
Replies
5
Views
1K
  • Last Post
Replies
13
Views
12K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
6
Views
2K
Replies
1
Views
614
Replies
3
Views
640
Top