Points inside the sphere

6 Ansichten (letzte 30 Tage)
Aliaksandra Sikirzhytskaya
Bearbeitet: James Tursa am 1 Nov. 2022
How to find if the points are inside or on the edge of the ellipsoid with the center at X Y Z and radiuses a b c?

Akzeptierte Antwort

James Tursa
James Tursa am 1 Nov. 2022
Bearbeitet: James Tursa am 1 Nov. 2022
Just plug your points into the ellipsoid equation and see if they work. E.g.,
((x - X)/a).^2 + ((y - Y)/b).^2 + ((z - Z)/c).^2 <= 1
Where x, y, z are the coordinates of your points.

Weitere Antworten (1)

Torsten
Torsten am 1 Nov. 2022
Hint:
Use the function
fun = @(x,y,z) ((x-X)/a).^2 + ((y-Y)/b).^2 + ((z-Z)/c).^2 - 1.0;

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by