How to creat 3D mesh about superellipse hole in a cube
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
The equation of the superellipse is (x/a)^p+(y/b)^p+(z/c)^p=1. p<2.a,b,c are constant. I want to draw a 3D mesh of the cube include this superellipse. I download iso2mesh which can generate 3D mesh but not succeed.
0 commentaires
Réponses (1)
KSSV
le 2 Nov 2018
th = linspace(-pi/2,pi/2) ;
phi = linspace(-pi,pi) ;
[T,P ] =meshgrid(th,phi) ;
a = 2; b = 2; c = 1 ;
X = a*cos(T).*cos(P) ;
Y = b*cos(T).*sin(P) ;
Z = c*sin(T) ;
surf(X,Y,Z)
Voir également
Catégories
En savoir plus sur Numerical Integration and Differential Equations 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!