Fill 3D array with function values at isosurface

조회 수: 7 (최근 30일)
shir
shir 2013년 7월 5일
First we have isosurface:
x=[-10:0.5:10];
[X Y Z]=meshgrid(x,x,x);
P=X.^2+Y.^2-Z.^2;
isosurface(P,1);
I want to calculate some quantity at isosurface points and then change values in the P array in corresponding points. Is there any way to do it ?
For example
x=[-10:0.5:10];
[X Y Z]=meshgrid(x,x,x);
P=X.^2+Y.^2-Z.^2;
q=isosurface(P,1);
x1=q.vertices(:,1);
x2=q.vertices(:,2);
x3=q.vertices(:,3);
p=patch(q);
in=isonormals(P,p);
n1=in(:,1);
n2=in(:,2);
n3=in(:,3);
quiver3(x1,x2,x3,n1,n2,n3);
Can i create regular 41*41*41 (size of P) array where points corresponding to isosurface will have n1 values and other will be arbitrary or interpolated or zeros. i've tried something like
F = TriScatteredInterp(x1,x2,x3,n1);
L=F(X,Y,Z);
but it doesnt seem to work

답변 (0개)

카테고리

Help CenterFile Exchange에서 Scalar Volume Data에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by