Fill 3D array with function values at isosurface

9 ビュー (過去 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 Center および File ExchangeScalar Volume Data についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by