Points inside the sphere
2 views (last 30 days)
Show older comments
Aliaksandra Sikirzhytskaya
on 1 Nov 2022
Edited: James Tursa
on 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 Comments
Accepted Answer
James Tursa
on 1 Nov 2022
Edited: James Tursa
on 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 Comments
More Answers (1)
Torsten
on 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 Comments
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!