How do you convert a surf object to an isosurface?
Mostra commenti meno recenti
How to convert a regular surf surface (rectangular mesh) to a patch isosurface (triangular mesh)?
I have seen how to go the other direction, but this one eludes me. After creating the isosurface, I need to run inpolyhedron() to see if points are inside or outside the object.
theta = (pi:0.1:pi);
phi = 0:0.1:pi);
[THETA, PHI] = meshgrid(theta, phi);
x = cos(THETA).* sin(PHI);
y = sin(THETA).*sin(PHI);
z = cos(PHI;
ellipsoid = surf(x,y,z);
(Extract the isosurface from the ellipsoid...)
fv = isosurface(something something ...)
pts = rand(5,3);
in = inpolyhedron(fv,pts); % check if points are inside or outside object
2 Commenti
John D'Errico
il 6 Mag 2024
It is an ellipsoid though! It is far simpler to test if a point lies inside an ellipsoid, if that is all you need.
Kurt
il 6 Mag 2024
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Scalar Volume Data in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

