Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
Linjun He
Linjun He am 21 Jan. 2019
Kommentiert: KSSV am 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');

Antworten (1)

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

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by