Points inside the sphere
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Aliaksandra Sikirzhytskaya
le 1 Nov 2022
Modifié(e) : James Tursa
le 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?
0 commentaires
Réponse acceptée
James Tursa
le 1 Nov 2022
Modifié(e) : James Tursa
le 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.
0 commentaires
Plus de réponses (1)
Torsten
le 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;
0 commentaires
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!