1. The problem statement, all variables and given/known data Hi, I'm writing a simple geophysics program in Fortran77. I'm trying to determine if a point (h,k,m) is within an angled ellipsoid. Theoretically I know the semi-axes of the ellipsoid (a,b,c), the value of the point (h,k,m), the azimuth (∅, +ve from the Y axis, 0≤∅<180°), the dip (β, +ve from the xy plane - for now, 0≤β≤90°) and the center of the ellipsoid (x,y,z). What I'm trying to determine is a formula which ties these all together. I've started developing one from what I know of angled ellipses. 2. Relevant equations Let ∅ = 0, β = 0 x^2/b^2 + y^2/a^2 + z^2/c^2 = 1 3. The attempt at a solution When angled this means: Let β = 0 ((x-h)sin∅ + (y-k)cos∅)^2 / a^2 + ((x-h)cos∅ + (y-k)sin∅)^2 / b^2 + z^2/c^2 = 1 OR let ∅ = 0 ((y-k)cosβ + (z-m)sinβ)^2 / a^2 + ((y-k)sinβ + (z-m)cosβ)^2 / c^2 + x^2/b^2 = 1 ∴ ((y-k)sinβ + (z-m)cosβ)^2 / c^2 + ((x-h)cos∅ + (y-k)sin∅)^2 / b^2 + ((x-h)sin∅ + (y-k)cos∅ + (y-k)cosβ + (z-m)sinβ) ^2 / a^2 = 1 ????? I don't think the formula above is right as it doesn't seem to account for the change in x when the ellipsoid is angled and tilted. Am I on the right track?