Points inside the sphere

7 visualizaciones (últimos 30 días)
Aliaksandra Sikirzhytskaya
Aliaksandra Sikirzhytskaya el 1 de Nov. de 2022
Editada: James Tursa el 1 de Nov. de 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?

Respuesta aceptada

James Tursa
James Tursa el 1 de Nov. de 2022
Editada: James Tursa el 1 de Nov. de 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.

Más respuestas (1)

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

Categorías

Más información sobre Computational Geometry en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by