Create surface consisting of two implicitly surfaces
2 ビュー (過去 30 日間)
古いコメントを表示
Dear Community,
I would like to create surfaces consisting of two implicitly described surfaces (see figure).
With the functions isosurface and isocaps I only manage to create a full body (see figure).
So far, I have to create two separate full bodies and then subtract them in another program by boolean subtract. Unfortunately, this route is complex and only works to a limited extent. Therefore, I would like to be able to use Matlab to create the surface limited by two implicit surfaces and the edge surfaces.
To create the stl-files I use as code (Note: This requires the stlwrite.m function):
clc
clear
close all
n=200;
t=pi/n;
x_max=1;
y_max=1;
z_max=1;
xi = 0:t:x_max;
yi = 0:t:y_max;
zi = 0:t:z_max;
[x,y,z] = meshgrid(xi,yi,zi);
F=-1.*(cos(2.*pi.*x)+cos(2.*pi.*y)+cos(2.*pi.*z))+0;
[fs,v]=isosurface(x,y,z,F,0);
[fc,v2,c] = isocaps(x,y,z,F,0);
fn = [fs ; fc+length(v(:,1))];
vn = [v ; v2];
stlwrite('geometry.stl',fn,vn);
Can anyone help me with this question?
Thank you very much and best regards
0 件のコメント
採用された回答
Bruno Luong
2020 年 8 月 11 日
"Can anyone help me with this question?"
Not clear to me what exactly is the question.
If you have two implicit equations for two surfaces F1==c1 and F2==c2, you might combine the surfaces of both by
(F1-c1).*(F2-c2) == 0.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Volume Visualization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!