Effacer les filtres
Effacer les filtres

How do I draw a specific type of 3d mesh for a implicit function?

2 vues (au cours des 30 derniers jours)
Linjun He
Linjun He le 21 Jan 2019
Commenté : KSSV le 21 Jan 2019
Here is the implicit function:(x1, x2, x3 are all in range [0,1])
p = 1;
f = @(x1,x2,x3) x1.^p + x2.^p + x3.^p - 1;
I want to draw this type of plot:
Here is what I get:
I want to get the same mesh as the first figure.
This is my way of generating the second figure:
p=1;
f = @(x1,x2,x3) x1.^p + x2.^p + x3.^p - 1;
[x,y,z] = meshgrid(0:.05:1,0:.05:1,0:.05:1);
v = f(x,y,z);
h = patch(isosurface(x,y,z,v,0));
isonormals(x,y,z,v,h)
set(h,'FaceColor','none','EdgeColor','r');
xlabel('x');ylabel('y');zlabel('z');
alpha(1)
grid on;
view([1,1,1]); axis equal;
When I use fimplicit3, I get the same result as the second figure:
p=1;
f = @(f1,f2,f3) f1.^p + f2.^p + f3.^p - 1;
interval = [0 1 0 1 0 1];
fimplicit3(f,interval,'FaceColor','none','EdgeColor','r');

Réponses (1)

KSSV
KSSV le 21 Jan 2019
  2 commentaires
Linjun He
Linjun He le 21 Jan 2019
Sorry, I did not get your idea.
KSSV
KSSV le 21 Jan 2019
YOu can define your sides of triangle and use TRansfinite interpolation.......refer the codes of the link.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by